KingBarou13!
KingBarou13!
CC#
Created by KingBarou13! on 10/5/2024 in #help
What the best way to handle splines/rail grinding in Unity?
they were giving my cryptic answers I just wanted to know a good starting point
6 replies
CC#
Created by KingBarou13! on 10/5/2024 in #help
What the best way to handle splines/rail grinding in Unity?
Tried there but wasn't helpful
6 replies
CC#
Created by KingBarou13! on 9/26/2024 in #help
Dash Panel Mechanic not working
The rigidbody is what has the ("Player") tag btw
2 replies
CC#
Created by KingBarou13! on 9/7/2024 in #help
Slope Physics not working when trying to make Sonic face movement direction
Debug.Log about to work overtime
36 replies
CC#
Created by KingBarou13! on 9/7/2024 in #help
Slope Physics not working when trying to make Sonic face movement direction
I've tried a bit before but I'll try again
36 replies
CC#
Created by KingBarou13! on 9/7/2024 in #help
Slope Physics not working when trying to make Sonic face movement direction
ohhh alright i was literally about to say that my current project is public on github and if you wanted you could have a look urself lol
36 replies
CC#
Created by KingBarou13! on 9/7/2024 in #help
Slope Physics not working when trying to make Sonic face movement direction
sorry but wdym? This is my first time implementing physics like this i only know the basics
36 replies
CC#
Created by KingBarou13! on 9/7/2024 in #help
Slope Physics not working when trying to make Sonic face movement direction
it's cause of the snap function. It's supposed make it so that uneven ground isn't that much of an issue
36 replies
CC#
Created by KingBarou13! on 9/7/2024 in #help
Slope Physics not working when trying to make Sonic face movement direction
This is how things look without the rotation handler script. Rotation handler only handles his y-axis rotation so looking left and right
36 replies
CC#
Created by KingBarou13! on 9/7/2024 in #help
Slope Physics not working when trying to make Sonic face movement direction
Yh i think i get what you mean
36 replies
CC#
Created by KingBarou13! on 9/7/2024 in #help
Slope Physics not working when trying to make Sonic face movement direction
I even pseudocoded a basic momentum system:
float currentSpeed; // Player's current speed
float currentRotation; // Player's current X-Rotation (Positive means going downhill so increase speed, negative means going uphill, so decrease speed)
float slopeDrag; // Deceleration rate going uphill
float slopeAssistance; // Acceleration rate going downhill

if (isGrounded)
{
if (currentRotation < 0)
{
currentSpeed += currentRotation * slopeDrag;
}
else if (currentRotation > 0)
{
currentSpeed += currentRotation * slopeAssistance;
}
}
float currentSpeed; // Player's current speed
float currentRotation; // Player's current X-Rotation (Positive means going downhill so increase speed, negative means going uphill, so decrease speed)
float slopeDrag; // Deceleration rate going uphill
float slopeAssistance; // Acceleration rate going downhill

if (isGrounded)
{
if (currentRotation < 0)
{
currentSpeed += currentRotation * slopeDrag;
}
else if (currentRotation > 0)
{
currentSpeed += currentRotation * slopeAssistance;
}
}
36 replies
CC#
Created by KingBarou13! on 9/7/2024 in #help
Slope Physics not working when trying to make Sonic face movement direction
Yeah that's the goal
36 replies
CC#
Created by KingBarou13! on 9/7/2024 in #help
Slope Physics not working when trying to make Sonic face movement direction
This is the basis of what I've been working with, but it doesn't translate that well into 3D in some parts. Slope detection works, it's just that I'm trying to implement a rotation script for sonic the face in the direction he's moving like face left when going left etc and that new script is what's messing up the slope physics
36 replies