Hey Facepunch
In my previous thread i discussed about using $collisionjoints on a custom model made with blender with animating parts. I have managed to sorta get it working and here is what it looks like in HLMV.
https://files.facepunch.com/forum/upload/111140/6eae0bd5-7220-4723-93e2-fee537fad1d5/CSAFE_TEST_8.mp4
The phys is offset on the door abit so i could see things from an easier prospective.when using vcollide_wireframe 1 in-game.
The problem now is, when i assign the model to an entity, it seems that the phys model just disappears?
Any help?
Only a prop_ragdoll can use a $collisionjoints physics model. All other entities either use a $collisionmodel, or custom Lua defined physics.
@Gmod4phun are you serious, so what would you suggest i do? Possibly export the door and box as 2 different models?
I remember that some entities used collisions while animating, like doors. However I am not sure if that entity is in GMod.
No, I'd disagree, it can be done but many developers choose not to create their own sequences ( animations ) rather they just animate through lua.
What are you making, what purpose will it have? Maybe we can figure something out
If you look in the video, thats pretty much what im doing, the door opening is through animation. the issue im currently having is when assigning the model to a sENT it appears that the doors phy model is only visible...
hmmm
Use prop dynamic, sents cannot do physics animations like how you want.
So, would i still be able to pacck this entity into an addon or no?
Could just make a square 4x4x4, with a 1x4 and LUA the angle of it like a door?
That use like stencils to create a beautiful hole in your 4x4x4, and put whatever you were gonna put inside.
my inner-being isn't capable of understanding the sophisticatedness of the great stencil dimension.
Your inner-being doesn't have to be capable, the beautiful people of facepunch forums have already made a tutorial:
Time For You to Understand Stencils!
Just try it, try all the options you can before asking for help on just one, remember, you might eventually take a liking to these other solutions (P.S You have more possibilities this way)
Obviously, you are not packing an entity but a script that creates and controls one, which can be an entity on its own.
the only what I can do it is ents.Create(“prop_dynamic”) then Serb the model...
i mean, it seems a weird way of doing it doeee
Here's an example for you on how I use the entity: (From my Half Life 2 Tools addon)
function ENT:Initialize()
if ( CLIENT ) then return end
-- self:PhysicsInit( SOLID_VPHYSICS )
self.door = ents.Create( "prop_dynamic" )
self.door:SetModel( self:GetModel() )
self.door:SetPos( self:GetPos() )
self.door:SetAngles( self:GetAngles() )
self.door:SetKeyValue( "solid", "6" )
self.door:SetKeyValue( "MinAnimTime", "1" )
self.door:SetKeyValue( "MaxAnimTime", "5" )
self.door.ClassOverride = "prop_door_dynamic"
-- self.door:SetParent( self )
self.door:Spawn()
self.door:Activate()
self:SetParent( self.door )
self.door:DeleteOnRemove( self )
self:DeleteOnRemove( self.door )
end
I love the way how it's like a sent, but your making a fake ent at the same time..
That's what your doing right?
Yes, it was vital for my mod to have duplicator support.
so inside of a sENT i'e got this...
function ENT:Initialize()
self.Safe = ents.Create("prop_dynamic")
self.Safe:SetPos( self:GetPos() + Vector(0,0,15) )
self.Safe:SetAngles( self:GetAngles() + Angle(0, -90, 0) )
self.Safe:SetModel( "models/cbusiness/safe_phys_concave_9.mdl" )
self.Safe:SetKeyValue( "solid", "6" )
self.Safe:SetUseType( SIMPLE_USE )
self.Safe:Spawn()
self.Safe:Activate()
end
What if i wanted to do a 'Use' because as far as i'm aware the 'SENT' is invisible ;o, i did remove self:DrawModel() since it'll make dupes.
You you'd probably need to use the gamemode hook which is less than ideal, but it may be as good as you are going to get.
I thought it was fixed, turns out the full phys model appears, but now the door phys doesnt sync with the door models animation..
jus gunn b depressdeeded
Try a known working model like the combine doors. If they work properly with an animation like "open" then its your model.
Also you should be playing the animation through the entity inputs (see valve dev community page for prop_dynamic)
Sorry, you need to Log In to post a reply to this thread.