I aked aVoN about it and he said..
[QUOTE=aVoN;13871077]Disabling collusion between specific props: logic_collision_pair, aka nocollide can be used (one coll_pair entity can be used to make several props nocollide).
Harder is the part, to make props and world nocollide: COLLISION_GROUP_NONE could work.
But this has the side-effect that a prop can fall into the world.
And a way to touch the EH: The EH has TouchStart(),TouchEnd() and Touch() Hooks in it.[/quote]
Not sure if that's any help or..?
I hope, it does.
I have tried no colliding, that's what the dynamic function replacement was for.
I would inject my custom Touch hooks into the entities and remove them later.
(they would of course continue to point to the now renamed default TouchHooks and be restored when the two entities stopped touching)
The reason it doesn't work is (I believe) a problem with the way the engine works.
A simple test of the failing:
1.) Spawn two props
2.) Put one prop on top of the other, make sure the surfaces touch
3.) No collide the two objects
4.) Now try to force one object through the other
You will notice that you cannot do it, the engine seems to remember the collision point and it continues to register until the two entities are separated.
The TouchStart hook comes too late to prevent this. So I would have to nocollide the two entities and have them move the now touching entity away so that the surface is forgotten and remember to not remove the no collide because the TouchEnd hook will be called for this.
It should be possible but it's by no means a clean method.
What are you trying to do? Making the prop nocollide with the event horizon?
well since you cant just noclolide one part of a prop and you have to nocolide the entire prop, it is so you dont run into it when walking behind the gate where the prop is supposidly invisible
Nope, I not only want it to be dynamically no collided for players (what Halo 228 said) I want props entering through the front not to collide with props from the back but definitely to collide with props on the same side.
I doubt you can make stuff nocollide on one side, but not on the other.
If garry added something similar to the gm_guardian module I could do it easily.
What would be the next best alternative? Objects in the horizon collide with everything except the world?
Every object should be nocollide with everything as soon as they touch the event horizon or are behind it.
I also once had an idea: I remember, stuff in the same collision group collides. So what about setting the props to COLLISION_GROUP_NONE (does not collide with anything) and put some sort of "container" around the horizon with COLLISION_GROUP_NONE too. So the props wont collide with the world or any other props, but (hopefully) with the container.
Positive part: Stuff can't "fall into world" if it's through and still nocollides with any props/world outside.
(That container could be lua-generated: A flat surface on the ground - But I have not tested it yet)
I used that collision group for the video, objects with collision_group_none do not interact with each other, but they still collide with the world.
strange.
Wasn't there a collgroup which does not collide with the world?
Not that I'm aware of:
[url]http://wiki.garrysmod.com/wiki/?title=Collision_group[/url]
Damn, I didn't think this was even possible. Nice work.
It is nice work. All we need now is for it to be fixed up, and added to the real Stargates.
I didn't think it was going to be possible due to collision groups etc.
It would be a bit crap if you just spent ages building somehing, only for it to smack against the wall behind your base's stargate, or fall into the void below the map.
what was it that you were proposing? that the things half way in the gate would collide with nothing?? or only with the gate itself?
[QUOTE=GenXCypher;13968863]I didn't think it was going to be possible due to collision groups etc.
It would be a bit crap if you just spent ages building somehing, only for it to smack against the wall behind your base's stargate, or fall into the void below the map.
what was it that you were proposing? that the things half way in the gate would collide with nothing?? or only with the gate itself?[/QUOTE]
I was proposing (initially, still am if I can figure out a way) for them to work just they like they should on the tv show:
Props entering the gate from the same side will collide, entering from opposite sides they will not. Of course they will still collide with the gate itself at all times. If they hit the world whilst entering the gate it will allow them to pass through it. Like aVoN mentioned earlier, I would probably have to create a new entity below the gate that would span the entire floor to prevent objects from falling through the world, this is probably the easiest part if I can figure out the previous ones.
[QUOTE=ZeikJT;13970755]I was proposing (initially, still am if I can figure out a way) for them to work just they like they should on the tv show:
Props entering the gate from the same side will collide, entering from opposite sides they will not. Of course they will still collide with the gate itself at all times. If they hit the world whilst entering the gate it will allow them to pass through it. Like aVoN mentioned earlier, I would probably have to create a new entity below the gate that would span the entire floor to prevent objects from falling through the world, this is probably the easiest part if I can figure out the previous ones.[/QUOTE]
Couldn't you make some compromise? It doesn't has to be perfect or exactly like in the show. The Stargate Addon isn't that either, but still it's just awesome.
Your work looks great, I would even take it as it is now (talking about the video). Just make it nocollide with everything, except the gate. Maybe you could get the players as a seperate group and make them collide too. That would be enough. It would still be pretty nice.
That's the problem, I cannot get it to no collide with everything EXCEPT the gate.
It's either all or nothing.
Collision groups are untouchable, they seem to be hardcoded enumerations.
this "floor" entity you propose to put under the gate.. will it ALWAYS be at the bottom of the gate (facing the bottom of the world) because if not, then it could cause major issues if you turn the gate upsidedown etc xD
C'mon, give me some benefit of the doubt. Of couse if I was to integrate a 'floor' entity I'd do it right. If the gate was in the air I wouldn't want some magical invisi-floor then either ;D
So, got any ideas on how to control an entity's collisions?
And there is no way to enable collision for some entities again? Like nocollide with everything and then enabling collision with the gate afterwards?
Create an adv. ball-socket for no-colliding world, and just a normal no-collide for every prop touching the event horizon.
Hey dude, I watched the video of what you have so far and I am very impressed with the physics you've got going on, but I do have some questions that need to be asked.
1. Where did the props go?
2. What would happen if you throw the props at the EH, would they slow down as the go in or what?
3. Is that the final texturing? I think it looks kinda crap.
4. Which side would you step into to come out of a different gate?
5. Is it possible you could upload this on garrysmod.org so we can use it?
I think that's it really.
[QUOTE=DarKSunrise;13983164]Create an adv. ball-socket for no-colliding world, and just a normal no-collide for every prop touching the event horizon.[/QUOTE]
Or in short:
Create [b]one[/b] [url=http://developer.valvesoftware.com/wiki/Phys_ballsocket]phys_ballsocket[/url] entity with the spawnflags 3 (1 + 2).
Then attach it to the entity and to the world by calling bsocket:SetPhysConstraintObjects(NULL,phys_object_of_the_prop) and call bsocket:Spawn() and bsocket:Activate().
Try this with [b]only one[/b] phys_ballsocket first. If it works like nocollide (logic_collision_pair), the ballsocket properties like "free movement + nocollide" stays even if you use the same ballsocket more than once. (Avoids spamming of the phys_ballsocket).
[lua]local bsocket = ents.Create("phys_ballsocket");
bsocket:SetKeyValue("spawnflags",3); -- free movement and nocollide
for _,v in pairs(my_entities) do
bsocket:SetPhysConstraintObjects(NULL,v:GetPhysicsObject()); -- NULL = World's physobject, other from the prop
bsocket:Spawn();
bsocket:Activate();
end[/lua]
The props are now "nocollided" with the world but do collide with other props. But the idea by DarKSunrise to nocollide this prop with every other "inside the event horizon" is dumb. For 11 props, you need 10*9*8*...*2*1 = 10! = 3,628,800 nocollides.
[QUOTE=vnwez123;13983391]Hey dude, I watched the video of what you have so far and I am very impressed with the physics you've got going on, but I do have some questions that need to be asked.
1. Where did the props go?
2. What would happen if you throw the props at the EH, would they slow down as the go in or what?
3. Is that the final texturing? I think it looks kinda crap.
4. Which side would you step into to come out of a different gate?
5. Is it possible you could upload this on garrysmod.org so we can use it?
I think that's it really.[/QUOTE]
1: Invisible, behind the event horizon
2: They would just move in
3: It's the same texture like in the stargate-pack and the very best texture yet available as event horizon in a source-game (note: a texture is not a material. If you refer to shaders like "water effects", you meant a material - The issue with "water-shader-materials" I had so far was, they do not glow in the dark = crappy as event horizon).
4: From the front :P
5: He is still working on it. He will with a propability of 99.9999% not upload his unfinished work just because "you can't wait"/"want to try" - Wait form him, until it's done. Or you may judge his work on a beta-stage so you call it "crap" just because it isn't done.
[QUOTE=aVoN;13983788]Or in short:
Create [b]one[/b] [url=http://developer.valvesoftware.com/wiki/Phys_ballsocket]phys_ballsocket[/url] entity with the spawnflags 3 (1 + 2).
Then attach it to the entity and to the world by calling bsocket:SetPhysConstraintObjects(NULL,phys_object_of_the_prop) and call bsocket:Spawn() and bsocket:Activate().
Try this with [b]only one[/b] phys_ballsocket first. If it works like nocollide (logic_collision_pair), the ballsocket properties like "free movement + nocollide" stays even if you use the same ballsocket more than once. (Avoids spamming of the phys_ballsocket).
The props are now "nocollided" with the world but do collide with other props.[/QUOTE]
There's a phys_ballsocket entity? Oh my god, I've been so blind, of course it's an entity!
I haven't worked on the zclip code for so long it's about time I tried again.
I don't know what I'd use a for loop though, objects should touch individually... unless it would be to apply it for the whole contraption at once, I'd rather each gain the nocollide-with-world properties only when they pass through the horizon if ever.
Still the idea is a great one, thanks for telling me about it!
[QUOTE=aVoN;13983788]But the idea by DarKSunrise to nocollide this prop with every other "inside the event horizon" is dumb. For 11 props, you need 10*9*8*...*2*1 = 10! = 3,628,800 nocollides.[/QUOTE]
That much I knew, it's why I so badly wanted to take the collisiongroup route. I think I'll make it so once an entity has passed fully through the eventhorizon it will change collision groups.
@Anyone who's curious: Since the current eventhorizon entity is stand alone and doesn't link up to others (currently) the objects are being removed when they pass through it.
Also, the eventhorizon texture is a custom one made by myself using AfterFX. It looks much better without the crappy video compression I promise.
I did use a snippet of aVoN's code to make it look more transparent when you are facing it from the back. (This was not applied when I made the video)
EDIT: Just looked in the constraint module to find that the regular ballsocket has no settings for the angle restrictions, I'll have to use the phys_ragdollconstraint instead.
[QUOTE=aVoN;13983811]1: Invisible, behind the event horizon
2: They would just move in
3: It's the same texture like in the stargate-pack and the very best texture yet available as event horizon in a source-game (note: a texture is not a material. If you refer to shaders like "water effects", you meant a material - The issue with "water-shader-materials" I had so far was, they do not glow in the dark = crappy as event horizon).
4: From the front :P
5: He is still working on it. He will with a propability of 99.9999% not upload his unfinished work just because "you can't wait"/"want to try" - Wait form him, until it's done. Or you may judge his work on a beta-stage so you call it "crap" just because it isn't done.[/QUOTE]
1. If they were behind it then how come in the video he didn't walk into them?
2. Ok cool good to know.
3. Never mind it was probably just the video quality.
4. Maybe that was a bit of a stupid question :D
5. Ok I figured there would be no possibility of it being uploaded, but I don't appreciate you just assuming that since it would be a beta or unfinished that I would call it crap and hate it for ever even when it's good when you don't know me and what I'm like, I think you need a serious attitude readjustment this isn't the first time you've been rude to me for asking harmless questions and you reply in an unprecedented and offensive manner, you should be thankful that people take an interest in what you do, I myself am a big fan of Stargate and not just a somebody that thinks it's cool and never heard of the Movie and or TV series, people look up to people like you, crushing them like there nothing really sucks the least you could do is fake it.
He wasn't saying that specifically to you, he mean't people in general who may also download it will come and complain about bugs that he already knows about. You may say he's wrong now but he has alot of experience in the subject, sometimes aVoN just comes of as a little bit arrogant partialy due to the fact that english isn't his first language.
[QUOTE=pokeman;14024131]He wasn't saying that specifically to you, he mean't people in general who may also download it will come and complain about bugs that he already knows about. You may say he's wrong now but he has alot of experience in the subject, sometimes aVoN just comes of as a little bit arrogant partialy due to the fact that english isn't his first language.[/QUOTE]
Yeah I guess your right. What's his first language?
[QUOTE=vnwez123;14021192]1. If they were behind it then how come in the video he didn't walk into them?
[/QUOTE]
They have no collision i guess.
And aVoN's first language is German.
Sorry, you need to Log In to post a reply to this thread.