#Why can I enter my modded vehicle only when its not touching the ground?

85 messages · Page 1 of 1 (latest)

nova rock
#

the origin of the vehicle prefab might be clipping underground

fading current
#

oh

#

also while you're here can i ask if this is setup correctly for constant force

nova rock
#

almost

#

make sure this gameobject is at the same point and rotation as the vehicle prefab itself, then give it a fixed joint and set the parent/origin of the joint to the vehicle (drag and drop the veh. prefab to the corresponding field in the joint)

#

make sure rigidbody values are the same and then you're good to go

fading current
#

ah

#

joining them makes sense

#

tysm

nova rock
#

np

fading current
#

if i wanted to call this with a hook, i'd deactivate the siren gameobject and put it in the hook to have it enabled there?

nova rock
#

ideally, you dont want to turn off the rigidbody, so turn off the constant force itself

#

rigidbodies store their current velocity so if you going 150kph and turn it off, then you stop, when you turn it on, it'll shoot the car forward until it loses velocity too

#

so just rename this gameobject to something else, like speed or idk, then have a new Sirens gameobject with an activation event hook script attached to it, turn the constant force on and off

fading current
#

ohhh

nova rock
#

or even better

#

have no rigidbody and have the constant force on the prefab itself

#

each additional rigidbody and joint takes up processing power

#

get too many of them and you'll run at 10fps

fading current
#

i tried that earlier but it didn't work

nova rock
#

has to, i remember it working for me

fading current
#

ill show you what i did

#

sec

fading current
nova rock
#

yep, keep them rigidbodies enabled or dont even use them unless you have to

fading current
#

wait so turning the bodies off is the cause of that?

nova rock
#

yes

fading current
#

interesting

nova rock
#

should work

#

what gameobject is the turret event hook on?

fading current
#

uhh

#

vehicle prefab

nova rock
#

it has to be on a turret

#

turret_x

fading current
#

oh my god

nova rock
#

what are you trying to do? maybe i can help

#

tho make it quick cause 2am and i wanna sleep xD

fading current
#

its a drone and you right click to fly forward because im using a Engine Helicopter

nova rock
#

yeah then just add a turret_0 to it, which is driver seat and put the turret hook on that

#

make sure you set up 2 functions to disable the cons. force

#

one function is aim stop and the other is passenger removed

#

you can exit a vehicle while still holding the aim key, which doesnt trigger the aim stop function

fading current
#

alright

#

should the rigidbody be kinematic, use gravity, or none for objects that have a constant force

nova rock
#

no gravity, no kinematic

fading current
#

also what is the diff between aiming and aiming local

nova rock
#

just make sure drag/weight is matched to the parent gameobject

fading current
#

oh ok

nova rock
#

say you have a function that enables a blue light

#

aim start enables it for the entire server, aim start local enables it only for you

fading current
#

oooh

#

i see

#

oh it just teleports me to some random position in the world wtf

#

i must've messed something up

nova rock
#

yes, most likely

#

that usually happens when turret and seat id's are mismatched

#

turret 0, seat 0
turret 1, seat 1 etc

fading current
nova rock
#

if you want to have a turret on your 6th seat only, then it'll be Turret_6 in unity with Seat_6

fading current
nova rock
#

the .dat is fine, that dont matter

#

yes, hierarchy issue

#

Tutrets>Turret_0>Yaw>Pitch>Aim

fading current
#

is yaw and pitch exclusive to helicopters or

nova rock
#

it's exclusive to any turret setup, mandatory

fading current
#

oh

nova rock
#

then you set yaw/pitch values in the .dat file

#

if you want no yaw, set both values to 0

#

if you want no pitch, set both values to 90

#

if you set pitch to 0, it'll make you face upwards

fading current
#

so its similar to that of a jet

nova rock
#

identical

#

well if you get stuck on anything, just write it here and i'll check in the morning

fading current
#

alright

#

thanks for the help

#

good info, i appreciate

nova rock
#

np

fading current
#

works as intended

#

:)

fading current
nova rock
#

some gameobject is clipping underground, preventing you from entering because the game thinks it's "blocked"

fading current
#

Hmm

#

I swear none of the gameobjects are in a funky spot, I'll check my invisible ones' positions when I have a chance.