Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
[Upd.5][WIP] Crafterria http://www.volumesoffun.com/phpBB3/viewtopic.php?f=18&t=599 |
Page 6 of 6 |
Author: | petersvp [ Sun Oct 11, 2015 4:16 pm ] |
Post subject: | Re: [Upd.5][WIP] Crafterria |
The Debug Console is my own work It is not hard to make. I already have a idea for Console Interface, and I will need this over TCP/IP so I can embed the runtime with the Qt Editor |
Author: | petersvp [ Sun Oct 18, 2015 10:52 pm ] |
Post subject: | Re: [Upd.5][WIP] Crafterria |
The newest Forest and foliage screenshots |
Author: | David Williams [ Tue Oct 20, 2015 8:01 pm ] |
Post subject: | Re: [Upd.5][WIP] Crafterria |
Looking really nice (especially the screenshots with the trees). I was always hoping to make a 'clutter' system for Cubiquity which would randomly spawn any user provided mesh, so that it could be used for trees and grass but also for rocks, etc. I guess you spawn objects at the terrain vertices and then jitter them horizontally as required? Or are you placing them with raycasting? |
Author: | petersvp [ Fri Oct 23, 2015 9:16 am ] |
Post subject: | Re: [Upd.5][WIP] Crafterria |
Entities are spawned by prefab name on their Voxel coordinates (Integer positions). In most of my entities there is a script attached that realigns them to ground via single raycast. The PolyVox mesh is used for colision as MeshCollider Code: void alignToGround()
{ float dist = 1; transform.position = hitPoint; //We start from here! transform.position += new Vector3(0, dist, 0); RaycastHit hit; bool hasGround = Physics.Raycast(new Ray(transform.position, Vector3.down), out hit, 2); if (!hasGround) { //revert transform.position -= new Vector3(0, dist, 0); } else { transform.position = hit.point + (hit.normal * groundOffset); if (orientateToGround) { transform.up = hit.normal; transform.Rotate(Vector3.up, angle + Random.Range(-angleDeviation, +angleDeviation)); } } } |
Page 6 of 6 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |