Search the Community
Showing results for tags 'bodyrigid'.
-
Hi, I am not able to find any info in the docs on this, I have been looking at the parameters window and i can't see any option which can be used to constraint a Rigidbody's Rotation or Position. Auto-Complete also didn't provide anything useful when i type BodyRigid.Constraint, how to enable body Constraints in unigine?
-
Hi, when using "public BodyRigid nodename" the editor does not show the property field. ComponentClass supports Node and Unigine.Component and not Physics-Related Classes. Is there code to validate the node type? Or to get direct feedback in the editor if the selected .node is not acceptable? This is my current code, it works and keeps the program from crashing on Init. General help and advise is always welcome. public Node bouncing_node; private BodyRigid bouncing_body; private void Init() { if(bouncing_node) { if(bouncing_node.NumChildren > 0) { var child = bouncing_node.GetChild(0); if(child.ObjectBodyRigid) { bouncing_body = bouncing_node.GetChild(0).ObjectBodyRigid; } } } } private void UpdatePhysics() { if(bounce_triggerd) { bounce_triggerd = false; if (bouncing_body) { bouncing_body.AddForce(vec3.UP * bounce_power); } } }