Question: How to apply impulse/force on a specific surface point of an object

I am new to this engine and I am still trying to figure out how to apply force on a specific surface point of an object.

Specifically, I have a raycast from the camera to a cube, and I use the location vector of where the ray hits the cube as the point to apply the impulse to the cube. I am using logic nodes and the apply impulse node appears to only apply the force through the center point of the cube. Do I have to write haxe for this? If so, where in the armory api can I reference to start working on this?

One solution I have thought is to use a sphere rigidbody to be shot to that surface point, but that way it complicates things because the sphere might interfere with other objects in the scene. I thought there might be a neater solution to this.

Thanks in advance.

No idea how to do this in nodes, in HAXE you can use this function of Rigidbody
public function applyImpulse(impulse:Vec4, loc:Vec4 = null)
the “loc” is the position in local space relative to the object origin, so you may need to do some calculation.

Bit late replying to this but I added an ApplyImpulse node a short while ago - I think its in 0.4 if not update to lastest SDK

It occurs to me that ‘Impulse’ might not be the best name, but that is the location of the impulse.

1 Like