#If ( hole ) then hole:Colide() else world:Collide() end
1 messages · Page 1 of 1 (latest)
I'm gonna need you to please explain this part to me real slow
If you get collisions working for this, I would very much like to know how you made that happen
I dont quite have the structure down yet
no promises, but im thinking itll either be some custom Move hook or some teleportation trickery
The approach I have in my head is something like:
- Use Nak's library to get the world's collision info for the world around the hole
- Put a hole in the geometry where the hole is
- Overlay it on the world
- Swap whether entities collide with the world or the overlay as they cross the threshold
- Make this intelligently batch nearby holes together and size the overlay based on the size of the entities entering it (Easiest step)
Which is obviously crazy and thus I did not do any of that
oh i wasnt even thinking about props
lol
props are easy though, you can just do a ShouldCollide
You know, I don't think that's exactly "easy"
compared to players its a cakewalk
Please explain, because the way I'm thinking doesn't seem like it would be easy
wouldnt be perfect but you could just disable collisions with the world when the prop is in range
and redraw the entity so it looks like its in the ground
havent heard of that
a very stripped down way to test collisions
....How do you use these for collision testing?
TraceBox
oh it needs a model
Oh, sorry, didn't see the tracebox function
or a box
yeh
This would help somewhat, but I don't think it would be great at the part of prop physics where, say, a can rolls down into a hole
I'm not an expert on the physics engine, but I can't really imagine that working well
Yeah, I'm not trying to nail you to this or anything, it's just a very interesting problem to solve
I would just make a separate space inside the map somewhere, instance the holes into perhaps one location. Then, when the object is in range, it would rerender (perhaps twice.) eliminating the collisions for the main one, yet applying physical force from the copy model. Rendering and what not would make it appear somewhere it’s not. Idk if that makes sense but that’s sort of how I would go about it.
That sounds crazy but intriguing
portal.
Yup 💯
man those college kids and valve were ahead of their time in 2007
The math would be easy as WorldToLocal -> LocalToWorld then just some rendering and collisions to mimic the surface used.
The only other option I can think of is to eliminate the entire map’s physics, recompile it. Then make alterations on the fly. This would be my last resort.
Silverlan did this with his hammer editor
(Cut my map into pieces)
Yeah, so if you had thousands of brushes, yikes
Niknaks probably make it a lot easier to push lua physics instead. But lua physics is slow, and has a heap of problems.
If only we could “delete” brushes from the map, this could be done easier.
yea ive got a solution which should work for both cases, player & world
not sure how the players interactions will be but it should be passable without needing any major changes to the movement system
props should work fine, long as their origin doesnt fall too far outside the world
otherwise they stop getting networked which is something i cant really do anything about
Reroute traceline so you can shoot through holes
i dont intend to make holes
just small craters and stuff
unfortunately doesnt seem like i can make bullets ignore the world
Filter Entity(0) maybe? Idk if that would work.
A crater on a corner is what I’m thinking about