Forums

OverviewV-Play 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
    V-Play 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
    V-Play Team

    Hi Raimonds,

    see the docs here.

    Cheers, Chris

    • This reply was modified 4 years, 5 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
    V-Play 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support