Super Mario 64 type controls (agian)

Blitz3D Forums/Blitz3D Beginners Area/Super Mario 64 type controls (agian)

Cubed Inc.(Posted 2010) [#1]
Before I say anything, I already made another post about the very same topic. I am trying to achieve the 3rd person controls that are used in most platforming and action games. Super Mario 64 is probably the most well known example. The reason for me restarting this post is becuase the original post of the same topic became confusing and hard to follow. I spended some time learning about some of the functions and I think that I am more familiar now. But regardless, I still need help with my code(which I couldn't have made without the help of the original post). Whenever I press the arrow keys to make the character turn towards the directions, the character spins and glithes infintitly. To make my code easier to figure out, I have replaced the 3d models with primitive shapes. You can also ignore the FastLibs extension codes.


please help out. I really need to achieve these controls for my game.


GIB3D(Posted 2010) [#2]
TurnEntity(Player,0,DeltaYaw(Player,PlayerOrientation),0,True)


You should put a multiplier onto DeltaYaw. Without one, it will spaz out like that.

TurnEntity(Player,0,DeltaYaw(Player,PlayerOrientation)*.8,0,True)



Kryzon(Posted 2010) [#3]
It's not the speed, because even with a 100% value the player should turn correctly, even if snappy.

EntityParent(PlayerOrientation, camera,False) ;False makes the pivot snap to the camera's orientation and position automatically.

Why are you parenting the PlayerOrientation to the camera? (this is not rhetorical, do answer).

It's the VectorPivot that needs to be at the same position as the camera, but not this one.
Don't parent the Orientation pivot to anything, just create it.


Cubed Inc.(Posted 2010) [#4]
I tried both and none worked. I don't want to sound like an ass, after all I am the person asking for the help, but did you try the codes before you posted them? I'm gratefull for your help and i'm trying to say this as friendly as possible, please don't take it the wrong way:) I tried disconnecting the camera from the player to see if the problem was in the camera, but it is the player. Whenever I press left or right, he spins out of control, whenever I press down, he just glitches alot. I modified the code and I turned the pivots into cubes so I could see where the pivots were located. One of the pivots was placed in the middle of the character and the other one was at some other place.

could that have anything to do with the problem?


GIB3D(Posted 2010) [#5]
I looked at the code but it's kinda hard to try it without the media. I have FastExt but I probably don't have some of the texture you have and I don't feel like editing it all out.


Cubed Inc.(Posted 2010) [#6]
GIB3D
well, since your helping me, I want to make it as easy as possible for you to understand my code. I'll repost the code to make it easier to work with. So you want me to keep the 3d model, but remove the FastLibs functions?


GIB3D(Posted 2010) [#7]
I have FastLibs so that doesn't need to be removed, it's just all the other textures and stuff that I don't have.


Cubed Inc.(Posted 2010) [#8]
ok, here's the new edited version of the code. I removed all of the textures and models and replaced them with primative shapes and colors.
I didn't remove it, but I would suggest not using the FastLibs bloom effect, becuase it can make it harder to see with all of the bright colors.
Here's the code

Hope you can help me out.