I've run into a bit of a snag with my current project.
I am creating prop_physics entities on the clientside and I then need to be able to hit these entities with traces.
Unfortunately, it seems this is not possible, or *hopefully* something has to be done to enable traces to hit them.
Here is what I am currently doing on the Client:
[code]
local Ent = ents.Create("prop_physics")
Ent:SetModel("models/Items/AR2_Grenade.mdl")
Ent:SetPos(Vector(0,0,0))
Ent:Spawn()
[/code]
And then I will do a QuickTrace right through 0,0,0, also done on the Client (Which would normally hit that entity)
[code]
local Trace = util.QuickTrace(Vector(0,0,100),Vector(0,0,-200))
PrintTable(Trace)
[/code]
The trace result shows that it hit nothing, however if I then create this entity on the serverside with the exact same code above, it hits it with a trace.
I have tried playing with :PhysicsInit(SOLID_VPHYSICS), :InitializeAsClientEntity(), and various other functions, but none of them have allowed me to trace it.
Is anyone aware of a way to get this to work?
Maybe there is a mask you need to set the trace to in order to hit client entities.
Clientside prop_physics's doesnt have any form of physics, i don't think theres a way
[QUOTE=Tobba;25747601]Clientside prop_physics's doesnt have any form of physics, i don't think theres a way[/QUOTE]
Actually you can give them physics.
[QUOTE=DarKSunrise;25747664]Actually you can give them physics.[/QUOTE]
Correct, and I tried this, which also did not allow traces to hit. I was hoping someone would have ran into this issue before and found a solution, but I suppose the chances of someone making props clientside and then needing to trace them does not occur often.
Maybe try changing the collision bounds?
[QUOTE=ralle105;25748239]Maybe try changing the collision bounds?[/QUOTE]
Tried that as well, did not resolve it.
this is why I want a trace function that will hit models just like bullets do
[QUOTE=CapsAdmin;25748409]this is why I want a trace function that will hit models just like bullets do[/QUOTE]
That would very handy at times like these. I wonder how easily the Tracer code could be reverse engineered to give us this function.
[QUOTE=CapsAdmin;25748409]this is why I want a trace function that will hit models just like bullets do[/QUOTE]
Bullets don't hit client-side stuff though.
[QUOTE=ralle105;25748662]Bullets don't hit client-side stuff though.[/QUOTE]
There's probably some flag or whatever something that you can enable on them.
[QUOTE=ralle105;25748662]Bullets don't hit client-side stuff though.[/QUOTE]
What about stuff like CSS debris? Bullets will effect those, but traces won't hit them.
Sorry, you need to Log In to post a reply to this thread.