Hello!
This questions strays a bit from your usual "How do I start up Cryengine?" and I would like to ask about the fundamentals of making a certain entity.
Floating platforms are the staple of many adventure games, but I'm not sure how to make create the springy effect for such things. What kind of things would I use in code to achieve this effect?
I'm not looking for exact instructions, but more a place to start so I can learn along the way
Thank you!
Answer by Cry-AK76-1 · Sep 29, 2016 at 01:16 PM
one way is to use constraints with force limit. if you use constraint entity, negative limit values specify that when the limit is reached it won't break, but just won't apply any more force. in constraint flowgraph node (and, of course, in c++ code) this flag is explicit. note that it's not a spring in the strict sense, i.e. the force is not k*offset, and if the object's mass*gravity is more than the constraint limit, the platform will just keep dropping and the constraint won't be able to stop it. it's generally a more stable solution, but it may or may not be what you want. you can also add any custom impulses yourself by subscribing to immediate poststep events from the platform rigidbody (set pef_monitor_poststep flag and add a listener with AddEventClient)
Thank you for the fantastic answer, and certainly the best I've seen anywhere, really.
So it sounds like I want to use a constraint, but will I have to manually apply a constraint to every rigidbody, or is there a way to shove it in via code?
I have been using this doc quite frequently
http://docs.cryengine.com/display/SDKDOC4/Physics+System+Programming
Edit: I see that constraint is not a misc entity as I once thought. So I will figure out how to add these constraints to the entity. Thanks again!
you can use entity, c++/script code, or flowgraph
also, there's an updated version of the docs here http://docs.cryengine.com/display/CEPROG/CryPhysics
Answer by game_dev5-1 · Oct 09, 2016 at 04:38 PM
Some of the information applies, but I'm using a template. Thanks for the help!
Answer by ahmad0karami · Oct 09, 2016 at 07:18 PM
i downloaded cryengine 5.2.1 .
but i seen that NO entity???
why???!!!!
i seen CryEngine 3.8.6 have a lot Object for Make Rain, Make Snow,Make Ripple Effect,Make Particle,etc
But No exist entity inside CryEngine 5!!!
also i Generate solution , then i seen 8KB Code C++ for Light Object !!! why???
I want a game engine have a lot Object(Entitty) and Less Code !!!
i see that Flowgraph No Have independent of C++ !!!
why??
I'm really confused !!
I am really angry!
Are you using a blank templates? You will need to use GameSDK or one of the templates, which have a watered down version of Basic Entity
Download GameSDK from marketplace and its codes from here.
How to setup ignore collision filtering for entity in C++ 2 Answers
How to set specific spawnpoint? 0 Answers
Corrupted layers? 2 Answers
Create hazard C++ 1 Answer
Cannot drag entities into viewport 4 Answers