Game Development Community

Mario Galaxy Styled Engine, Math issues

by Matt Ahrens · in Torque X 3D · 04/08/2010 (9:41 pm) · 4 replies

Ok, I know the basics behind how to make a Mario Galaxy Styled Engine, but I am not sure how to implement, I created my own component, and during the process tick method i test a raycast and if it returns true, i attempt to rotate the player, based on the normal, however i don't know how. My attempt didn't work so well, it erred because the normal wasn't set, as if it didn't collide, which it probably didn't since i forgot to add collision to the sphere, so does anyone have any good advice for me?

#1
04/08/2010 (10:05 pm)
I don't really know how the RayCast and RayCastQueryData work, i added a collision sphere, and object types and it still comes up empty, does the raycast even use the normal variable?
#2
04/09/2010 (6:05 am)
I think i may need to brush up on my matrix math, and trig a little, then maybe i can figure it out, and find the normal myself if i have to.
#3
04/09/2010 (7:53 am)
There's a little project floating around the net, I think I saw it by way of Gamasutra, called Mario Galaxy Demystified. At least I think that's the name, if it isn't then it's something similar. Anyway, it's a little C++ unit test someone came up with to help explain how that style of gameplay can be achieved. That should help you figure out where you might be going wrong.

Edit:
I was right, it was from an article on Gamasutra.
#4
04/09/2010 (11:45 am)
i did read that, and it was in Blitz3D, that just told me the general idea, but i need some help implemnting it in torque x 3d