Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › How to create terrain

Tagged: , ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6812

    Raimonds

    Hi,

    I want to create terrain that would be flexible (can dig some places and can collapse if it must). Is there easy way to create it? and how about performance?

    Best Regards,

    Raimonds

    #6813

    Christian
    Felgo Team

    Hi Raimonds,

    terrains are a tricky beast. The way it would work is if you build your terrain out of different BoxColliders, CircleColliders and PolygonColliders (keep in mind the maximum number of vertices is 8).

    So in your case (“digging”) it sounds like you could do what you want with BoxColliders. Performance can be improved if you put the lower boxes in your terrain to sleep so they don’t affect the physics calculations.

    Cheers, Chris

    #6817

    Raimonds

    Hi Chris,

    Thanks for your suggestions, I will try it.

     

    Best Regards,

    Raimonds

    #6826

    Raimonds

     

    Christian said:

    put the lower boxes in your terrain to sleep so they don’t affect the physics calculations. 

    How to make entity “Sleep”?

     

    Raimonds

    #6827

    Christian
    Felgo Team

    Hi Raimonds,

    see the docs here.

    Cheers, Chris

    • This reply was modified 10 years, 2 months ago by  Christian.
    #6828

    Raimonds

    Hi, Chris

    Thanks for quick response.

    that Link does not work… but i found that at help – colliderbase has property “sleepingAllowed”… is this is the right property?

     
    <div>
    <table>
    <tbody>
    <tr valign=”top”>
    <td>sleepingAllowed : bool</td>
    </tr>
    </tbody>
    </table>
    </div>
    <div>

    This property holds whether the body is allowed to get inactive for performance optimizations. The default value is the inverse of collisionTestingOnlyMode, so <tt>sleepingAllowed: !collisionTestingOnlyMode</tt>. This is needed to avoid sleeping when the collider gets used for collision detection, because if no forces or impulses are applied to the body it will sleep by default.

    If collisionTestingOnlyMode is left at its default value (Which is false), this property has the default value <tt>true</tt>.

    </div>

    #6830

    Christian
    Felgo Team

    Hi Raimonds,

    yes sorry, that is the right link. I also updated the link to the sleeping property in the ColliderBase above, so it is working now.

    Cheers, Chris

Viewing 7 posts - 1 through 7 (of 7 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded