Dismounting and disabling collisions on prop_vehicle_driveable

Mar 2, 2018
124
4
*SOLVED (sort of) apparently you have to fire an addoutput with "solid 0" using a logic_auto idk why that is but that's how I got the collisions disabled.

So I have this entity in my map and everything's working as intended except for collisions and dismounting, the player has to kill themselves to dismount and even though I've set the Collisions aka "solid" keyvalue to 0 the vehicle still collides with the world. my guess is that it just inherits the prop_static keyvalues and ignores some of them including the "solid" one.
So, is it possible to somehow disable the collisions, perhaps using a logic_collision_pair on the vehicle and the worldspawn / world_items entities and having an option to dismount without "kill" or "explode".
Also, a warning to those who see this thread in the future and use this entity as well, make sure to lock the vehicle for the first 30~ seconds of the game otherwise players who enter it while "waiting for players" will be teleported to 0 0 0 and will have to relog.
 
Last edited:

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
How does this entity even function properly? (From my experience the vehicle rolls back constantly, the camera is stuck and no controls work)
 
Mar 2, 2018
124
4
How does this entity even function properly? (From my experience the vehicle rolls back constantly, the camera is stuck and no controls work)
You add spawnflags 1 and it’s fine (the vdc says it only exists for prop_vehicle but it seems to work on driveable too*) also it's phys_constrained to a func_brush, the view thing and controls restriction fit perfectly for my usage of this entity (rollercoaster seat) so it's not a problem either.

*just checked, the CPropVehicleDriveable class extends CPropVehicle that’s why the flags work.
 
Last edited:

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
You add spawnflags 1 and it’s fine (the vdc says it only exists for prop_vehicle but it seems to work on driveable too*) also it's phys_constrained to a func_brush, the view thing and controls restriction fit perfectly for my usage of this entity (rollercoaster seat) so it's not a problem either.

*just checked, the CPropVehicleDriveable class extends CPropVehicle that’s why the flags work.

You shouldn't be using this vehicle, as spawnflags 1 is very expensive on physics, especially if parented. A game_ui and point_viewcontrol is a better alternative (point_viewcontrol cannot be parented, you need to use a logic_measure_movement instead for fake parenting)
 
Mar 2, 2018
124
4
You shouldn't be using this vehicle, as spawnflags 1 is very expensive on physics, especially if parented. A game_ui and point_viewcontrol is a better alternative (point_viewcontrol cannot be parented, you need to use a logic_measure_movement instead for fake parenting)
Edit: forgot to add, I don’t really like point_virwcontrol plus it adds the feeling that the player’s not really there, een though that entity could be an alternative to the vehicle it just renders everything pointless in my opinion it’s like showing the player a movie, plus they wouldn’t be able to mount and dismount the train that easily.
A vehicle is a must in this case for a few reasons:
The rollercoaster has a loop and the only possible means of having the players view upside down like it should be in a loop is using an env_viewpunch or this.
Also the func_tracktrain that is the rollercoaster travels at high speeds and turns at angles that make the player stuck or fall off unless they’re in a vehicle.
Also note that it’s phys_constrained, not that it really matters because what you’re saying is true anyways I guess but if you parent a vehicle it will crash your game.

I believe the vehicle entity allows more than one passengers which is great for this case.

Uses less entities and currently not causing lag or anything even though it thinks every frame.

Is not glitchy at the moment, the only glitch I’ve had (pregame hardlock) was solved easily and it works

Thanks for the advice anyways, I’ll consider this in case it is relevant again.
 
Last edited:

ficool2

L4: Comfortable Member
Oct 28, 2017
161
232
Edit: forgot to add, I don’t really like point_virwcontrol plus it adds the feeling that the player’s not really there, een though that entity could be an alternative to the vehicle it just renders everything pointless in my opinion it’s like showing the player a movie, plus they wouldn’t be able to mount and dismount the train that easily.
A vehicle is a must in this case for a few reasons:
The rollercoaster has a loop and the only possible means of having the players view upside down like it should be in a loop is using an env_viewpunch or this.
Also the func_tracktrain that is the rollercoaster travels at high speeds and turns at angles that make the player stuck or fall off unless they’re in a vehicle.
Also note that it’s phys_constrained, not that it really matters because what you’re saying is true anyways I guess but if you parent a vehicle it will crash your game.

I believe the vehicle entity allows more than one passengers which is great for this case.

Uses less entities and currently not causing lag or anything even though it thinks every frame.

Is not glitchy at the moment, the only glitch I’ve had (pregame hardlock) was solved easily and it works

Thanks for the advice anyways, I’ll consider this in case it is relevant again.

You can make a info_target, and setparentattachment it so it rotates, and attach the viewcontrol to this info_target with the logic_measure_movement
Vehicles cannot be made non solid, this is stated in source code to always force it solid as otherwise it completely breaks.

So sadly, you probably cant use a vehicle. Cannot dismount people either.
 
Mar 2, 2018
124
4
You can make a info_target, and setparentattachment it so it rotates, and attach the viewcontrol to this info_target with the logic_measure_movement
Vehicles cannot be made non solid, this is stated in source code to always force it solid as otherwise it completely breaks.

So sadly, you probably cant use a vehicle. Cannot dismount people either.
I might consider that because once you disable collisions you can’t reenable them on vehicles, using “addoutput solid 0” actually works so technically you can disable collisions but it fucks up the vehicle so you can’t enter anymore