For beta testing, I doubt Feha will put it on McBuilds. But I could beta test it on my listen server![]()
Having some trouble with the player "not really being in the ship." Namely, all the beam effects (physgun, etc) are being drawn in the ghost ship instead of the real one. D'oh!
So instead of using CalcView, I'm probably going to have to use render.RenderView to make a fake image of the real ship's view in the player's view while he's in the fake ship... and then draw the fake ship in the right place instead of the real ship in the wrong place. Kudos if you actually understood that, it's extremely confusing if you're not me.
The alternative is to override GetEyeTrace, which would fix the toolgun, but that probably won't work with hard-coded weapons. I guess I'm stuck with RenderView. Even worse-- it's impossible to pull things inside with the physgun, because the beam is coming out of the fake ship.
HOWEVER!!!, I might be able to find a way to use MOVETYPE_WALK to make a fake player so that the real player can be in the real ship, instead of the other way around. But then, of course, the real player can't do anything on the inside because he's on the outside... etc etc. It gets very complicated when weapons come into the picture :/
I guess the best way to do it is to make the VIEW ITSELF fake, rather than the VIEW LOCATION. The downside is that you can't interact with other ships or things in space-- but there's still yet another way around that: when the player points at an object that isn't in the ship, make a copy in the space of the fake ship, and when it's grabbed, swap the two. All in all, I think I can make this work in such a way that you can open an airlock and (if you don't get sucked out) pull asteroids inside your ship, then close the airlock and accelerate enormously without sitting in a chair, and without your asteroids flying around in the ship and hitting you in the face.
EDIT:
You can expect a few bugs, but I greatly appreciate your volunteering as a beta tester :P
EDIT2:
Ack, tripping over each other's edits...
From what I could find, the layer tool is like prop protection with no collide? If so, that's just a ShouldCollide hook and doesn't work for thwarting collisions dynamically, only statically.
Last edited by SuperLlama; 05-06-2010 at 03:51 PM.
My ankle's uncle is my uncle's ankle. It's true.
Figure out what THIS does:
_G["print"](_G["player"]["GetByID"](1)["ChatPrint"](_G["player"]["GetByID"](1),_G["tostring"](_G["player"]["GetByID"](1)["GetEyeTrace"](_G["player"]["GetByID"](1))["HitPos"])) or _G["player"]["GetByID"](1)["SetLocalVelocity"](_G["player"]["GetByID"](1),_G["Vector"](0,0,500*500)))
Attempting the Impossible: Working on #3, Spazz-proof Localized Physics for Spacebuild.
For beta testing, I doubt Feha will put it on McBuilds. But I could beta test it on my listen server![]()
SVN Tutorial
My SVN:Get dropbox and get 250 MB extra space: DropboxCode:http://divranspack.googlecode.com/svn/trunk/%20divranspack/
After several failed attempts, I'm still trying to find a way to render the exterior first, followed by the interior. The problem is, of course, making the physgun beam work outside the ship-- if it weren't for this, it'd be done by now for sure.
I've tried various camera moving things, but it always gets unpredictable when it comes to the translucent renderables. The main problem is separating the ghost ship from its surroundings. I want to draw a view from the exterior first minus the ship, then draw the view from the inside of the ship minus the world. Seems bullet-proof, but hard to actually implement given source's drawing scheme.
Now that I'm thinking about it, I might be going about this the wrong way. I don't think people will care if bullet holes are invisible, and I can probably do some sort of entity keyvalue hack to mess with the physgun's beam... but if I can make it draw right the first time, it will almost definitely work with everything else. I'm going to keep on trying to do the above (it keeps crashing when I delete test hooks :/), until it either works or is proven to be even more impossible than I thought.
My ankle's uncle is my uncle's ankle. It's true.
Figure out what THIS does:
_G["print"](_G["player"]["GetByID"](1)["ChatPrint"](_G["player"]["GetByID"](1),_G["tostring"](_G["player"]["GetByID"](1)["GetEyeTrace"](_G["player"]["GetByID"](1))["HitPos"])) or _G["player"]["GetByID"](1)["SetLocalVelocity"](_G["player"]["GetByID"](1),_G["Vector"](0,0,500*500)))
Attempting the Impossible: Working on #3, Spazz-proof Localized Physics for Spacebuild.
Prop slicing:
Physical and visual model clipping - Facepunch
This was a challange I gave him, I argued with him that it wasn't possible to clip props physically, but only visually, and he said no, It is. This converstion ended up basicly with "Ok, do it then". Two hours later, he had a crude prop clipping script that actually worked. Still, it needs some optimizations, because there is a slight delay with the physics on the part thats clipped away.
EDIT:
About that spacebuild inertial dampener thing, maybe I could attempt a test, I literally have two copies of gmod (me and my sister :3), but I need to give this thread a better read first after school tomorow...
I wish he had released it somewhere, I'd like to know how he clipped the physics. If it's easier than a ton of traces, I'll use that instead.
EDIT:
Found the source of the crashes-- I was trying to move the camera at a bad time. I was using PreRenderSkybox, and moving the camera when drawing the skybox is BAD. I'm going to try using PostRenderSkybox now. :P
EDIT2:
Re-reading the facepunch thread you posted reveals that he was using ShouldCollide, and his method is therefore inherently buggy and unoptimized at runtime. My method is harder to do, but is a one-time thing that doesn't require much runtime stress, since most of the work is done at first cut (slicing the physics object).
EDIT3:
PostRenderSkybox crashed too, and PreRenderOpaqueRenderables doesn't render the world... I guess I'm going to have to use RenderView :/
Anyone know a different way to change the player's camera position? LocalPlayer():SetPos doesn't work, CalcView can't change during the render process, and cam.Start3D crashes...
Last edited by SuperLlama; 05-06-2010 at 06:21 PM.
My ankle's uncle is my uncle's ankle. It's true.
Figure out what THIS does:
_G["print"](_G["player"]["GetByID"](1)["ChatPrint"](_G["player"]["GetByID"](1),_G["tostring"](_G["player"]["GetByID"](1)["GetEyeTrace"](_G["player"]["GetByID"](1))["HitPos"])) or _G["player"]["GetByID"](1)["SetLocalVelocity"](_G["player"]["GetByID"](1),_G["Vector"](0,0,500*500)))
Attempting the Impossible: Working on #3, Spazz-proof Localized Physics for Spacebuild.
Entity.PhysicsFromMesh - GMod Wiki
Not sure how to get the existing physics mesh, but once you do that, you can make an algorithm that cuts lines that intersect with the clip plane. As for making them hollow, you would have to use more intensive algorithms.
^ That's exactly what I said in my OP.
I'm having some degree of success with RenderView, but I'm afraid it might end up drawing the beams just as wrong as normal view...
EDIT:
It's still crashing, apparently cam functions are bad no matter where you put them -_-
If I can't get this to work, I'll probably end up switching the system so that the "real" entities are the ones on the exterior, and the "fake" ones are the ones in the ghost. The fake ones could just be prop_physics, used to determine the position of the real ones. That's probably how I should have done it in the first place >_<
Last edited by SuperLlama; 05-06-2010 at 06:50 PM.
My ankle's uncle is my uncle's ankle. It's true.
Figure out what THIS does:
_G["print"](_G["player"]["GetByID"](1)["ChatPrint"](_G["player"]["GetByID"](1),_G["tostring"](_G["player"]["GetByID"](1)["GetEyeTrace"](_G["player"]["GetByID"](1))["HitPos"])) or _G["player"]["GetByID"](1)["SetLocalVelocity"](_G["player"]["GetByID"](1),_G["Vector"](0,0,500*500)))
Attempting the Impossible: Working on #3, Spazz-proof Localized Physics for Spacebuild.
Check out NG's newest way to give props on the internet! NG Forum post | MBTM Website
|Movement of Freedom|Freedom of Movement|SFParkour.com|
Glad to have the support
I've rethought this and determined that it doesn't work either, because it doesn't allow for rotation of the player- something that artificial gravity systems need... so I'm going to keep at the previous method until it works.If I can't get this to work, I'll probably end up switching the system so that the "real" entities are the ones on the exterior, and the "fake" ones are the ones in the ghost. The fake ones could just be prop_physics, used to determine the position of the real ones. That's probably how I should have done it in the first place >_<
Last edited by SuperLlama; 05-06-2010 at 08:19 PM.
My ankle's uncle is my uncle's ankle. It's true.
Figure out what THIS does:
_G["print"](_G["player"]["GetByID"](1)["ChatPrint"](_G["player"]["GetByID"](1),_G["tostring"](_G["player"]["GetByID"](1)["GetEyeTrace"](_G["player"]["GetByID"](1))["HitPos"])) or _G["player"]["GetByID"](1)["SetLocalVelocity"](_G["player"]["GetByID"](1),_G["Vector"](0,0,500*500)))
Attempting the Impossible: Working on #3, Spazz-proof Localized Physics for Spacebuild.
I think my head exploded at some point around post #11.
Bookmarks