It is currently Sat Aug 22, 2020 3:40 am


All times are UTC




Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
 Post subject: Re: [Upd.5][WIP] Crafterria
PostPosted: Sun Oct 11, 2015 4:16 pm 

Joined: Tue Apr 08, 2014 5:10 pm
Posts: 124
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 :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: [Upd.5][WIP] Crafterria
PostPosted: Sun Oct 18, 2015 10:52 pm 

Joined: Tue Apr 08, 2014 5:10 pm
Posts: 124
The newest Forest and foliage screenshots

Image

Image

Image

Image


Top
Offline Profile  
Reply with quote  
 Post subject: Re: [Upd.5][WIP] Crafterria
PostPosted: Tue Oct 20, 2015 8:01 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: [Upd.5][WIP] Crafterria
PostPosted: Fri Oct 23, 2015 9:16 am 

Joined: Tue Apr 08, 2014 5:10 pm
Posts: 124
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));
               
            }
        }
    }


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net