Add velocity when jumping : I see, so I completely misinterpreted that. I understand what you're saying, true physics ok, but in actuality it reduces velocity, when you jump in the opposite direction the platform is moving. That won't be obvious to the editor I think. If you jump in the direction of the moving platform, there is also no added velocity then? It will also cause the player to loose speed. This is idd what I saw, I jump off and when I reach some height, there is clearly a slow down of my speed happening, while I assumed I would get a speed boost. In the opposite direction I should basically fall straight down more or less, which is more realistic. I'll do some tests. So for jump/launch platforms, I have to not use "add velocity when jumping", but actually just "add velocity when stopping", which did work in my early tests I think, but haven't tested it enough.FishyClockwork wrote: ↑Tue Aug 16, 2022 12:26 amOk, "add velocity when jumping away" was added because a friend of mine wanted somewhat realistic velocity physics. In this case, with that flag enabled, if you attempt to jump away in the opposite direction of where a platform is moving, what would happen is your velocity becomes 0 as soon as you lose contact with the platform. Technically what's going on is for every actor a platform loses, add some velocity based on the platform's movement to the lost actor. This is what it's supposed to mimic.
"Add velocity when stopping" was meant for things that move rather fast then "stop abruptly".
Please not that "stopping" means either A) reaching the last interpolation point or B) reaching a point with a defined "hold time" (to wait). When it "stops" it will add velocity to all its passengers based on its prior motion.
The effect this is supposed to achieve is throw off everything it was carrying if a very fast platform comes to a sudden stop.
As for the "crush obstacles" flag. It does nothing unless you give your platforms a defined crush damage (argument 4 under "Action / Tag / Misc." tab)
Normally when pushing away obstacles and they can't be pushed because the obstacle is against a wall it will receive crush damage.
If "always crush obstacles" is enabled crush damage is applied every time the obstacle is pushed away. That's the difference.
Think of a speeding truck (platform) hitting something. You'd want the truck to not only push away but also hurt whatever it's pushing away, right?
Crush obstacles: oh okay, didn't see it had a parameter for crush damage. Great! Ok, makes sense to me.
update:
Ok, I've done more testing of jumping off my moving platform with flag "add velocity when stopping" and it does achieve the effect I was after, but you need to wait until the platform is effectively stopped (interpolation point needs to have a stop time > 0), you get the extra velocity and you fly off, and then you can still do a jump and have the velocity and height you need to bridge a large gap. I've noticed however that the platform needs to move really fast. I now have a model platform moving 712 pixels with otic 1 travel time and this allows the player to bridge a gap of 900 pixels. As an editor you have no indication of what you're going to achieve (how far the player may fall off), so trial and error is needed here, but I'm very pleased with what I'm seeing. No issues to report. I have not yet tested extreme values to see if anything pops up.
I tried to make more sense of it by polling the player's velocity in a OPEN script, so I have some indication of the numbers that are passed to your functions, but all I'm getting is zero zero zero.
Code: Select all
int intVelocityX;
int intVelocityY;
int intVelocityZ;
while (true) {
intVelocityX=GetActorVelX(0);
intVelocityY=GetActorVelY(0);
intVelocityZ=GetActorVelZ(0);
Print (s:"Player velocity: ",d:intVelocityX,s:" ",d:intVelocityY,s:" ",d:intVelocityZ);
Delay(35);
}