Xonotic Forums

Full Version: extended gravity system
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[attachment=690]

If you can understand my illustration

I propose 2 new gravity entities be implemented
point gravity ... and planear gravity


Point gravity

-- players are pulled to and are rotated so their feet face a central gravitational force (they can be repelled too )

-- A the bounding box ... a big trigger texture box that states how far the gravity reaches
-- B something solid so players don't actually reach the gravity source
-- C the origin brush .. specifying where the gravity source comes from (could be a target position if that is easier to code for)
-- D players jumping around the little planet map made with this method



Planear gravity

-- players are regionally pulled and rotated by flat gravity sources

-- A something solid
-- B the bounding box for gravity influence
-- C the other bounding box for the other gravity field in this example
-- D one side of the bounding boxes is origin texture ... to show where objects in the area are rotated and pulled to
-- E players having a joyous time ... and navigating corners

I think these 2 entities would make xonotic much more exciting ... and possible bring new life into many old space maps ...

I also intend for these to replace many difficult-to-map warpzone tricks (like rooms where players can walk on the ceiling --- or round planets)

yeah ... i know its kinda mario galaxy-ish ... but who says it can't fit into xonotic too
Planar gravity -ish can be achieved using warpzones, there's a proof of concept map somewhere.

Otherwise, you can forget about this. As far as I know, bounding boxes can not be rotated without making the collision code a hell of a lot more complicated.
I did know about both of these warpzone tricks ... but they are hackish - difficult to make - don't work in all cases - and require reflections turned on - and sometimes don't work very well...

as for collision code ... aww ... thats too bad I didn't know that is was an effecting factor ...

would it be possible to just resize and move the box to an appropiate place when the player is rotated ... oppesed to rotating the actual box?



[attachment=691]

it wouldn't be perfect ... but it would work very well where for planear gravity that is at a 90 degree from up (a cube world for example)
Then you'll be easier to shoot when you're angled, your bbox will extend forward from the POV which will make it seem like you can't touch walls and you pick up items too early... Basically, you will totally feel the angle, which is bad.
last desperate attempt to save this...

what if its only 90 degree angles
Then it's doable I think! Needs some client prediction code though.
I like the idea though I have absolutely no idea how to implement this. I really like the concept though. Possible new concepts for racing level design if implemented.
wait ... i think i though of another way to save this ... I just need to know something

can the current collisions system detect exactly where on the hit-box something collided? (besides headshots)
Sure. But if you intend to hack a non-cuboidal / unaligned hitbox based on cuboidal aligned hitboxes, you'll probably hurt performance :x
(04-07-2012, 07:10 PM)hutty Wrote: [ -> ]wait ... i think i though of another way to save this ... I just need to know something

can the current collisions system detect exactly where on the hit-box something collided? (besides headshots)

no. for the sort of collisions you need to respond to here, there's no "point of impact" response/data. also, headshots don't work by engine side collision detection but rather a svqc check based on where the trace (raycast) tracking the current bullet/railshot ended.
Oh right, I was thinking trace. Sorry.
sounds like a mess...

... just curious how does the speeder hitbox work (or is it just a cube plopped somewhere near the middle)
its just a cube plopped somewhere near the middle.
"plopped" Smile
thought so .. although

i was thinking ... what if the player had a grid of smaller hitboxes on each side ...
not that it would be pratical server/lag wise ...
...
...
but would it work?
You're starting to invent a physics engine there Tongue

Probably possible, but not optimal and quite slow.
Is it possible to use spherical collision gizmos instead of cuboidal ones?

[attachment=699]
that ... is a good idea Big Grin

... but xonotic players never spread out their arms like that
They should. When blown away by a huge rocket explosion.

Anyways, that's just to convey the concept.