Need Help withTekken/VF like character rotation

Blitz3D Forums/Blitz3D Programming/Need Help withTekken/VF like character rotation

eye(Posted 2005) [#1]
Hi,
Hope some one can help please.

Im having trouble on a beat-em-up im working on.

Im at a lost on how to make Entity A rotate around Entity B on a 3d plane like you can in VF or Tekken when you are avoiding an attack.

1) Entity A has to face Entity B while rotating.

2) After Entity A has finised rotating around Entity B, Entity B then will automatically rotate itself to face Entity A.

3) Then the camera also rotates to show the two entities clearly. (so both entities appear at the same distance from the camera along the z axis, like a 2d streetfighter view)

Thanks for your help.


fall_x(Posted 2005) [#2]
You can rotate your entity with

RotateEntity eA,0,DeltaYaw(eA,eB),0

Then you can move sideways to dodge.

About the camera, I don't really know, you probably could place a pivot between both entities, and move the camera relative to that.

To put the pivot between two characters easily, you can place it at one character's position, rotate it towards the other, and move it forward (half the distance between the two players, EntityDistance()/2.0).
There's probably better ways to do it, but that should work - I think :)


fall_x(Posted 2005) [#3]
Oh, you'd still need to move the camera to the correct spot, so you could place it at the pivot, and move it back the same amount as the distance between the two characters, and up a little... you'd have to experiment with this though. (Maybe half the distance and 1/4 up, or something like that).

I would do it like that because I don't know any 3D maths, but there are probably solutions that are a lot more performant. Plus I didn't think it trough, it's just an idea :)


eye(Posted 2005) [#4]
Thanks for your help.