Quote: "1. Calculate the character and the fish collision and then use the SC_GETFACEHIT command and get the polygon of the fish and after that get the nearest vertex of that polygon,get the position of the vertex and then subtract and add the vertex position into the charater position."
Something along those lines is what I am looking for. I remember seeing the SC_GetFaceHit() command, but never really used it. This could help out a lot.
Quote: "For starters, it's probably not a good idea to have such a thing as an animation - it's an important piece of level geometry, so I'd suggest handling the 'animation' manually, adjusting vertices yourself or using a collection of object segments which you can scale and rotate."
I considered the option to control it manually, but that is going to get really complicated according to my plans. If the collision system only requires to know where each vertex and surface is at any given time, then this can be acquired with using the
vertexdata commands.
Quote: "As for how to actually implement the collision it depends on what collision system you're using."
I'm not sure what you are asking, but if it helps, I can post the structure of the collision system:
-add force vectors to positions (gravity, hit force, movement etc.)
-check collision with level objects
-add collision vectors to positions (prevent player from going through walls)
-update player object with positions
So if I were to implement the animated collision into the current system, it would be after the forces, and before the collision checks.
-store old position values
-add force vectors to positions (gravity, hit force, movement etc.)
-use old+new vertex positions of bone animated object, and old+new player positions to calculate an offset
-add offset to positions
-check collision with level objects
-add collision vectors to positions (prevent player from going through walls)
-update player object with positions
OK, I'll try and code something now and see if it works
Quote: "It depends if you're using sparky's collision or what."
Yep, I'm using sparky's
Quote: "If you know the point that the player is at, and the point of the two vertices of the surface the player is standing on, then it wouldn't be too hard to find the point the player would be standing on after the vertices are transformed."
Quote: "SO if you can find those two vertices positions this frame and the next frame, then you're good ta go!"
Getting those positions required for the calculation should be the easy part, it's the calculations for the transformation that are screwing me...
Quote: "I only have 25 mins but I'll try to code up a working example of what I'm talking about in that time..."
Awesome, thanks a lot in advance!
TheComet