|
|
« Reply #4 on: May 19, 2010, 06:28:06 PM » |
|
Just copying the answer in the PM so anyone can learn xD
---
Do you know how to move models by using character animations? I think that's what you have left in order to make the shadows work properly. Just create a character animation in modeldata[1] and when in the model previewer for the MShadow model, select the animation. When you change the translations/rotations/scales, the numbers will turn yellow if the animation is properly selected. Also, if MShadow is the only model in the modeldata[1], it still won't move. Just duplicate the model inside modeldata[101] (the poketrainer one) and import it into modeldata[1], placing it in the first place.
By doing all of this, you should be able to move the model. Now let's talk about maths. MShadow is made with proper dimensions so placing it is easy. The model is 20 points in X, 0 points in Y and 20 points in Z. If you have, for example, a ground that goes from (x,y,z)=(-200,-10,Z) to (x,y,z)=(150,-10,Z), then you have that the total X lenght of the ground is 350. 350/20=17. This is the X scale for MShadow. Also, -10 will be the Y translation for MShadow. The X translation will be the middle point in X, so (-200+150)/2=-25. And Z will be determined of how is the ground in your stage. The X and Y values can be extracted from the collisions, just by viewing where the collision vertices are. For Z you will need to know the dimensions of the ground, or just test and fail. You won't be able to see the MShadow model in the collision editor at first, but if you preview it alone, you can enable the TShadow texture in it so you can view it in the previewers.
The collisions are only in X and Y, so you can't move them to the front or behind. That's why the collision data is useful to place shadows in X and Y, but not Z. You can move the stage, but not the collisions, so you can have battlefield in the background and brawling in front of it in an invisible platform.
I hope you understood this Bible xD
Thanks for your interest =)
|