Notifications
bg
K
KHerron
Jacksonville, United States
0
Likes
1
Follower
1
Connection
All
Articles0
Games0
Showcases0
Column0
Jobs0
I have a question concerning NavMesh and NavMeshAgents. I'm trying to add additional karts to my race. So far so good. They even move to each waypoint as I expected. However, what is NOT happening is, when the kart goes up or down a hill the kart doesn't tilt like the one I'm driving. They just move around flat. They do stay facing the correct way for their motion, and move along the track as expected otherwise? any ideas?

K
22 days ago
Reply@JulesAre you moving them by AddForce to their RigidBody, or by doing a Translate ? Because I think using Translate, you ignore the game physics.
I'm not doing it at all I guess the NavMesh agent is what moves the kart?
J
22 days ago
Are you moving them by AddForce to their RigidBody, or by doing a Translate ? Because I think using Translate, you ignore the game physics.
How do I access or change the Kart Stats from script. Say it goes through mud I want it to slow down until it gets out of the mud?

Bryan Fusilier
Composer/ Game Developer
a month ago
Awesome good job!
K
a month ago
Reply@Bryan FusilierYou may have to implement an if else statement for movement then update it in the timeout function to say if (gauge <=0) && (velocity.z <=0) { playercontrol.enable = false} or something along that structure...let me know if im any help at all. Sometimes i wonder..lol
OK, I think I found the answer. I have only been creating new scripts and objects, and have not really tried to alter any of the existing stuff that was put in place before I started the tutorial. For example the code that operate the input from the keyboard. All of this was already there. However, after looking, I found when the UP arrow is pushed, acceleration is increased by 1 every update. So even though my code was setting it to 0 every update, the other code was changing it back to 1. so it was going back and forth enough to keep the cart rolling. So I added a Bool IsEmpty to my GasGuase script, then in the Input.cs I added to the UP arrow to only add the 1 if IsEmpty = false. So now when the tank runs out, the cart will still coast a little while, but comes to a complete stop! Moving on to the next issue.......
Bryan Fusilier
Composer/ Game Developer
a month ago
You may have to implement an if else statement for movement then update it in the timeout function to say if (gauge <=0) && (velocity.z <=0) { playercontrol.enable = false} or something along that structure...let me know if im any help at all. Sometimes i wonder..lol
K
a month ago
Reply@Bryan FusilierOr you could ad a physics object to the mud and apply some friction
YES! I get it. I need to learn more about this lerp. I found I can access and alter the Karts movement stats by accessing Kart.KartMoveMent.defaultStats.Stat for example: MyKartMovement.defaultStats.acceleration =- .1; But if the player never releases the gas button, the kart keeps coasting forever unless you hit a wall and completely drop velocity to (0f, 0f, 0f) So I'm checking the velocity for a dead stop, then it will go to Game Over. But I need it to not allow the kart to move after acceleration has dropped completely to zero.
View More Comments
Sorry for so many questions, but how do I reference the Track Manager in another script to see if the game is running or not?

Is there any way to make a camera show on a billboard?

K
a month ago
Reply@MAKIHi, I made a shader with "culling off" setting, and I could show the back side of TrackCamberCurve. (The right-sided one is customized.) https://gyazo.com/32b8aff73cd069a7cebf6fda301003bd Is it answer that you demanded ? Thank you.
Yes, Thank you very much!
MAKI
MAKI VR
a month ago
Hi, I made a shader with "culling off" setting, and I could show the back side of TrackCamberCurve. (The right-sided one is customized.) https://gyazo.com/32b8aff73cd069a7cebf6fda301003bd Is it answer that you demanded ? Thank you.
MAKI
MAKI VR
a month ago
Reply@MAKIHello, KHerron-san ! I'm MAKI. I think the following tutorial will be helpful for your idea. https://learn.unity.com/tutorial/fps-mod-make-a-cctv-camera# Thank you !
Sorry, I have no idea. But, maybe it is because "Culling" is working. ★ShaderLab culling and depth testing https://docs.unity3d.com/Manual/SL-CullAndDepth.html > Back Don’t render polygons that are facing away from the viewer (default) i.e. back-facing polygons are culled.
K
a month ago
Reply@MAKIHello, KHerron-san ! I'm MAKI. I think the following tutorial will be helpful for your idea. https://learn.unity.com/tutorial/fps-mod-make-a-cctv-camera# Thank you !
Can you help me determine why my TrackCamberCurve is transparent from the back side?
View More Comments
Hello everyone. This is so exciting to learn new ways to create awesome games. I am new, but getting along fairly good. I have one question though, I have tried several ways and times to animate the clouds, but they never move, even though the editor shows the Y pos changing as it should? What am I doing wrong?

K
2 months ago
OK, I'm not bragging, but I have revised my scripts so I no loner have 3 different ones, and only 1 that handles it all. Also, by making some variables "public" you can now set: 1) the beginning direction 2) how far the object will move before moving back in the opposite direction & 3) the speed of the movement. I thought I would share it for other Karting beginners, as it not only helps you learn scripts, but it makes your game more realistic! using System.Collections; using System.Collections.Generic; using UnityEngine; public class BasicMovement : MonoBehaviour { public string Direction = "Right"; public int mUnits = 100; public double Speed = .05; double sXvalue = 0;

// Use this for initialization void Start() { } // Update is called once per frame void Update() { float spd = (float)Speed; if (Direction == "Left") { transform.Translate(spd, 0f, 0f); sXvalue = sXvalue + spd; if (sXvalue >= mUnits) { Direction = "Right"; sXvalue = 0; } } else if(Direction == "Right") { transform.Translate(-spd, 0f, 0f); sXvalue = sXvalue + spd; if (sXvalue >= mUnits) { Direction = "Left"; sXvalue = 0; } } else if (Direction == "Up") { transform.Translate(0f, spd, 0f); sXvalue = sXvalue + spd; if (sXvalue >= mUnits) { Direction = "Down"; sXvalue = 0; } } else if (Direction == "Down") { transform.Translate(0f, -spd, 0f); sXvalue = sXvalue + spd; if (sXvalue >= mUnits) { Direction = "Up"; sXvalue = 0; } } } }
Bryan Fusilier
Composer/ Game Developer
2 months ago
Reply@KHerronusing System.Collections; using System.Collections.Generic; using UnityEngine; public class CloudMove : MonoBehaviour { double sXvalue = 0; string dir = "left"; // Use this for initialization void Start() { } // Update is called once per frame void Update() { if (dir == "left") { transform.Translate(0.05f, 0f, 0f); sXvalue = sXvalue + .05; if(sXvalue >= 100) { dir = "right"; sXvalue = 0; } } else { transform.Translate(-0.05f, 0f, 0f); sXvalue = sXvalue + .05; if (sXvalue >= 100) { dir = "left"; sXvalue = 0; } } } }
Nice job! I look forward to seeing it when it's finished!
K
2 months ago
Reply@KHerronusing System.Collections; using System.Collections.Generic; using UnityEngine; public class CloudMove : MonoBehaviour { double sXvalue = 0; string dir = "left"; // Use this for initialization void Start() { } // Update is called once per frame void Update() { if (dir == "left") { transform.Translate(0.05f, 0f, 0f); sXvalue = sXvalue + .05; if(sXvalue >= 100) { dir = "right"; sXvalue = 0; } } else { transform.Translate(-0.05f, 0f, 0f); sXvalue = sXvalue + .05; if (sXvalue >= 100) { dir = "left"; sXvalue = 0; } } } }
Thanks, this is turning out to be very cool. I now have a CloudLeft, Cloud Right and a CloudBounce. ALL of my clouds move either starting to the left or right and some just move up and down. So the Y axis works too! Moving on to my next MOD!
Bryan Fusilier
Composer/ Game Developer
2 months ago
Reply@KHerronusing System.Collections; using System.Collections.Generic; using UnityEngine; public class CloudMove : MonoBehaviour { double sXvalue = 0; string dir = "left"; // Use this for initialization void Start() { } // Update is called once per frame void Update() { if (dir == "left") { transform.Translate(0.05f, 0f, 0f); sXvalue = sXvalue + .05; if(sXvalue >= 100) { dir = "right"; sXvalue = 0; } } else { transform.Translate(-0.05f, 0f, 0f); sXvalue = sXvalue + .05; if (sXvalue >= 100) { dir = "left"; sXvalue = 0; } } } }
Thats very good. I wasnt sure if you wanted to tackle that yet but great job!
View More Comments
About Me
No description
See more
Skills
No skills added yet
Certifications (0)
Import
See all
KHerron's liked projects (0)
No likes yet
Following (2)
Follower (1)
Following Companies (0)
Not following anyone yet