#If ( hole ) then hole:Colide() else world:Collide() end

1 messages · Page 1 of 1 (latest)

normal monolith
#

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

empty drift
#

I dont quite have the structure down yet

#

no promises, but im thinking itll either be some custom Move hook or some teleportation trickery

normal monolith
#

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

empty drift
#

oh i wasnt even thinking about props

#

lol

#

props are easy though, you can just do a ShouldCollide

normal monolith
#

You know, I don't think that's exactly "easy"

empty drift
#

compared to players its a cakewalk

normal monolith
#

Please explain, because the way I'm thinking doesn't seem like it would be easy

empty drift
#

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

jolly nova
#

PhysCollide

#

it's what portal uses internally iirc

empty drift
#

havent heard of that

jolly nova
#

a very stripped down way to test collisions

empty drift
#

oh wow

#

thats super useful actually

jolly nova
#

if only it had a line trace

normal monolith
#

....How do you use these for collision testing?

jolly nova
#

TraceBox

empty drift
#

oh it needs a model

normal monolith
#

Oh, sorry, didn't see the tracebox function

jolly nova
empty drift
#

yeh

normal monolith
#

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

empty drift
#

idk

#

again no promises, still working out the structure in my head

normal monolith
#

Yeah, I'm not trying to nail you to this or anything, it's just a very interesting problem to solve

sturdy vale
#

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.

normal monolith
#

That sounds crazy but intriguing

sturdy vale
jolly nova
#

man those college kids and valve were ahead of their time in 2007

sturdy vale
#

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

sturdy vale
#

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.

empty drift
#

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

normal monolith
#

Reroute traceline so you can shoot through holes

empty drift
#

i dont intend to make holes

#

just small craters and stuff

#

unfortunately doesnt seem like i can make bullets ignore the world

sturdy vale
#

Filter Entity(0) maybe? Idk if that would work.

normal monolith
empty drift
#

ah

#

i wont add that, as the stencil system im using now doesn’t support it

#

you’d need a renderview running per frame in order to cut the world like that