#Again, when climbing on a slope, speed

1 messages · Page 1 of 1 (latest)

noble fjord
#

If you want these to occur mutually exclusively, then you can just account for those with conditionals, no?

#

Oh here's a snippet that I have in my project, which sets the player's velocity to zero if their new velocity is against their old velocity:

Character.Velocity = MovementUtils.setXZ(
            Character.Velocity,
            (Vector3.Dot(horizontalVelocity, newVelocity)<0) ? Vector3.zero : newVelocity
        );
cobalt vale
noble fjord
#

There are probably some interactions in your game such that you would want more conditional control over the physics

#

I don't know what "like it normally would" means, here, because I'm not following everything

#

it's immediately incremented by the code that handles movement based on player input
What if you reversed the order of evaluation?

#

actually, now that I'm reading this out - is it feasible to only make one update to Velocity per frame? I think, if velocity recieves more than one additive operation within a given frame, I find it very hard to have control over its value

#

I think scaling and rotating the value is usually fine, but addition and subtraction gets confusing

cobalt vale
#

The values are actually consistent, as delta is actually derives from fixedDeltaTime

noble fjord
#

I don't think that has bearing on what I'm getting at, though