3d and game development thread

It looks good! Looks like you took some inspiration from the FN P90 without being a direct copy.

1 Like

Thanks! Yeah, that’s exactly the one I used for reference.

The UI looks clean btw! Could you explain what you did to find the one responsible for collision, I’m curious, couldn’t really think of something solid myself.

1 Like

Thanks man! The UI is from a game starter kit tho.

Im still working on the issues of cars pushing and causing spin outs. I initially decreased the vehicles velocity when being pushed. This worked very well on the player car but the ai dont respound the same way.

I also increased the grip of the vehicle being pushed to fight against skid a little. And i tried to ge t the contact points and add an equal opposing force to each co tact but it didnt have the desired effect i wanted.

Im thinking of approaching it from another angle. Maybe i should work more on the ai collision avoidance imstead of trying to fight the actual forcw on the car.

This is the code:

Its really simple and was extremly effective for the player car but im still missing something with the ai on ai collisions

1 Like

In the player script i also checked for wheel skid. I dont think that logic was on the photo but im gonna try to use that + angular velocity to decide which car i should offset. I think using just responsibly as the criteria is too simple.

So are the car behaviour all physics based? Or do you do any ā€œmanualā€ moving at all (such as transform.Translate)? Looks like when a car is hit, you use a ForceMode.impulse on it?

edit: i may have read your code wrong, anyway still wondering

Yea the cars move through the force applied by the wheels so there is no direct manipulation of the rigid boddy but unity physics calculation after applying torque to the wheels.

1 Like

Nice, I guess that gives the most realistic result. I’ve always been a fan of real physics in vehicles in games

1 Like

Thats just a small part of the ai code. The vehicle physics are done in another script. All this script does is handle ai driving and the collisions.

1 Like

Yeah I guessed so. :smiley: You must have a lot more code than that for full physics of everything and AI behaviour

1 Like

Yea me too… im Trying to finish this game as fast as i can because i want to learn alot more about the vehicle physics and how to program them.

1 Like

After i get the ai how i want them i will start working on the race tracks and then finiahing the car designs.

I realized it takes alot of work to build a good game from scratch and i would probably be bettwr off with help.

1 Like

I would like to help but I kinda wanna do my own thing right now, if you know. Kind of in the zone with 3d modeling hard surface, trying to improve skills there. I know you didn’t ask specifically lol but just throwing it out.

It’s impressive though what you have done and how long you have worked on it. I have just started project after project and never finished one.

1 Like

Thats cool man :sweat_smile:. Truth is i get alot of help through assets i buy. And it makes sense to be focused on your 3d modeling…you’re really good .

And yea..ive done ALOT of work on this game. Most of it i ended up not uaing because i could get assets that did better and leaen from them. Like i said before..as soon as i get this game done im gonna do nothing but work on my skills for a while. Actually finiahing a game showed me i need to learn ALOT more lol

1 Like

3 Likes

3 Likes

modified and textured

4 Likes

What is it?

Enough characters

1 Like

Well you can turn on or off those black things coming out of the cyllinder, and there’s a small monitor. In other words, I have no idea.

1 Like

Looks game ready lol

1 Like