Forum

User posts Will Welker
12 June 2017 17:19
Do you mean like this?


Or this?
12 June 2017 17:11
Okay, I finally know what you mean LOL. The ball retains its spin. Sorry it took me so long to figure out what you want. I tried the apply_torque function but it did not change the behavior.
m_physics.apply_torque(inParams[0], 0, 0, 0);

Maybe the answer is to load a new instance of the ball each time you shoot. That also means you can shoot more balls while the first one is still in the air. Maybe later today I will see if that works.
12 June 2017 06:00
It is probably only a matter of time. You know you can bake your IK animations? But is sounds like you want real time procedural movements. I want that for VR so your virtual arms sort of follow what the hands are doing. I have seen it in some of the games. Pretty advanced stuff for the browser but it will happen eventually.
12 June 2017 03:35
Ya, the ball rotates. It seems to be sort of a random value introduced by the physics engine. Sometimes fast, sometimes slower. I will attach a video. The ball shoots and resets very reliably for me. (I added some blocks).
11 June 2017 22:53
I made a change to one of the nodes that could be causing a glitch:


I took this node out of the loop. On a false, it was bypassing your reset function.
This project is a really cool example of a logic node + JavaScript project.
11 June 2017 22:22
m_physics.apply_velocity(inParams[0],0,20,0)

So this applies velocity to the ball's Y direction. When you tilt the cannon upward, the ball and its local coordinate system tilt also.

I am getting no glitchy behavior. If I tilt the cannon down, it shoots and the ball bounces. I can reset and tilt upward, then it shoots up, then falls and bounces. Give it wings and you have Angry Birds
11 June 2017 19:22
Okay, let me see if I can get the project running…
11 June 2017 19:20
Hi berdon,
This might help:
get_bone_tsr(armobj, bone_name, dest)
Or,
get_bone_tsr_rel(armobj, bone_name, dest)

You also have the set_bone functions on this page.
11 June 2017 19:13
Sure. Email sent.
11 June 2017 15:23
Hi mcolinp,
So I suspect you have some mesh faces that occupy the same space. If you upload your .blend file, I can have a better look at it.