Character and joints?

Mrgrinder

22-04-2008 12:02:39

Hi! Is it possible to have multiple characters connected with joints?

In our game http://gameawards.se/entry/106 We whant to create a "Tarzan" swing with our characters. For now we are using bodies and it works ok, but it would be better for certain other parts of the game if we could use characters instead!

betajaen

22-04-2008 12:30:19

Sadly, no.

betajaen

22-04-2008 17:07:48

But there may be a way to fake it. But the process is a little complicated, but has worked in the past before. If you want to know, I will tell.

Mrgrinder

23-04-2008 08:47:46

Sure, that would be great! And is there a way to lock the characters z axis, i just want it to move in x,y. And in some cases when they bump in to eachother the move in z now.

betajaen

23-04-2008 09:47:48

Since the Character's Actor is kinematic (doesn't respond to normal physics and forces - but can move around given a vector direction), you would want a dummy actor attached (using a revolute joint) to the rope/swing, from that you can translate the Character's Actor position based on comparing the last and newest position of the dummy Actor. Of course you will need to set collision groups accordingly. Once the Character is not swinging on the rope, you can destroy the joint and disable the dummy actor then placing it in a hidden part of your Scene (so it can be used again).

Mrgrinder

23-04-2008 10:11:15

Thanks betajaen, i will try that. And what about z axis, can i freeze it, like with bodies, raising a flag? For now i set the position z to 0 in my update. But in certain cases that doesnt work as i whant!

betajaen

23-04-2008 10:24:27

You can just not give a Z directional vector to the Character when you move it. Nothing can push or move the character except the Character itself. You may be able to raise the NX_BF_FROZEN_Z flag, and apply it to the Character's Actor - but it may not work for two to three reasons which I can think of.