Jump to content

Can't get the position of CSG objects?


nick.ace
 Share

Recommended Posts

The old "CSG geometry without either a script or mass attached gets 'collapsed' into nothingness" behavior has bit you in the arse, welcome to the club, I can still feel where it bit me.

 

Either add a mass or a script (a blank one is fine) to the CSG in question and you will be fine.

  • Upvote 1
Link to comment
Share on other sites

today i had the same problem, should be fixed, i waste hours for find the reason.

instead of crash there should be a message appear.

today i had also the problem that i can't start in debug mode...

if i call a simple command i expect it works and gave me the result.

PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265

2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ...

3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8

Music : Samplitude Music Studio , Music Creator 7

IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ...

Link to comment
Share on other sites

for me i using a csg /\ as respawn point, there from GetPosition() crash the game.

i replaced it with a pivot.

PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265

2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ...

3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8

Music : Samplitude Music Studio , Music Creator 7

IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ...

Link to comment
Share on other sites

what means?

i add a blue object from toolbar into the scene.

i drag the object from scene view into a player entity property var.

inside player script i call a function Respawn, there i test if the spawn point object is set

and want get his position.

replaced with a pivot works.

 

-- drag from scene tree view into this property field
Script.entityrespawnpoint = "" --entity "Respawn Point"
function Script:Respawn()--in
   if self.entityrespawnpoint ~= "" then
    self.alive=true
    self.health=self.maxHealth
    --crash!?
    local pos = self.entityrespawnpoint:GetPosition()
   end
end

PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265

2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ...

3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8

Music : Samplitude Music Studio , Music Creator 7

IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ...

Link to comment
Share on other sites

@nick

what ever he said, i selected a object shape from toolbar and put it into scene, its looks good in editor.

i do not expect any strange behavior. its a entity it have a position, this .getposition crash my game today.

objects do not need a script, object falling down if they have a mass, my was mass 0.

i replaced it with a pivot and everything was fine then.

PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265

2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ...

3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8

Music : Samplitude Music Studio , Music Creator 7

IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ...

Link to comment
Share on other sites

That's the thing though, it's not supposed to be an entity. It's actually part of a brush? (idk if I'm using the right terminology). Anyway, all of those CSG shapes aren't actually entities. You can also edit the terrain in the editor, but that's not an entity. It's just a little misleading since you can attach a script to it and do things like that, but you can't use standard entity commands.

Link to comment
Share on other sites

@nick,

yo , must be a entity, seems Josh fixed it :-)

PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265

2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ...

3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8

Music : Samplitude Music Studio , Music Creator 7

IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...