Jump to content

Recommended Posts

Posted

Sometimes this code won't pick entity even though it's certainly picked.

If GetEntityKey(mpick.entity, "player") then
'do stuff
endif

Windows 7 Ultimate | Intel Core i7 930 @ 2.80 ghz | Nvidia GeForce GTX 560 | Leadwerks 2.5 | Blitzmax

Posted

What exactly are you trying to pick ??? I can remember that you can't pick the terrian mesh direct or models ,where you have to get the mesh of the body first ( A model is a body, which has a mesh as child, so you have to get the child and read your key from that )

Posted

I am trying to pick other players. When player joins game i do this:

SetEntityKey( pp.model, "player", pp.nickname)

 

pp.model is:

pp.model = loadmesh("abstract::swat.gmf")

 

So pp.model is mesh and it should be picked?

Windows 7 Ultimate | Intel Core i7 930 @ 2.80 ghz | Nvidia GeForce GTX 560 | Leadwerks 2.5 | Blitzmax

Posted

Is it better to do some kind of "hitboxes" on players to register hits, or is this good way to go? Currently it's not really good because it's not working. :(

Windows 7 Ultimate | Intel Core i7 930 @ 2.80 ghz | Nvidia GeForce GTX 560 | Leadwerks 2.5 | Blitzmax

Posted

Have you set the entity type of the mesh and have you set the collisions so that the raycast type and mesh type result in a registered collision?

 

Also if the character is animated the pick will only work on the original mesh of the character and not the resultant skinning deformation you see.

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Posted

It is much better to check hit against some primitives not player mesh . Best practice use capsule . If you want to have check hits against all body parts then you have to make something like ragdoll and bounding box .First make check is there hit on bounding box.Only in the case if there is , then you can check which part of body.

 

One capsule is OK , make it simple.

  • Upvote 1
Posted

It is much better to check hit against some primitives not player mesh . Best practice use capsule . If you want to have check hits against all body parts then you have to make something like ragdoll and bounding box .First make check is there hit on bounding box.Only in the case if there is , then you can check which part of body.

 

One capsule is OK , make it simple.

 

 

Entity Picks only work on mesh / surfaces. How are you going to have a capsule mesh that isn't obscuring the model..... If you hide it the pick won't work.

 

I think you've confused this with body collisions.

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Posted

I guess you are alone with this cause its all about how you lay out the structure ...

 

object_phyBox.png

 

thats loosely implemented (like all releated to weapons) - however, i just load the mesh of a character and a controller which are not parent or child of the model but the loaded phy object is a child of the model and can be picked ... if that pick occurs i wander up and down the parent/child relations to send a hit message to the model (ENTITY_MODEL) which handles the animations etc. for the character mesh.

 

You most likely want to bind collision spheres to "bone" joints and work with pick.filter

(handling every pick like i do is pretty bad).

At the end i will track every character entity because i dont need to know that a pick occurred but which and where a character got hit by raytracing.

 

hth

AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3

zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5

 

adv_banner-april2012_720x150_tex01.png

 

Xxploration FPS in progress ...

Posted

Entity Picks only work on mesh / surfaces. How are you going to have a capsule mesh that isn't obscuring the model..... If you hide it the pick won't work.

 

I think you've confused this with body collisions.

 

Hmm, I have to think about that , but anyway , raycast with mesh that has 3000 or more polygons is not a good idea, especially when you have a lot of enemies in level. I don't know how LE handles that inside, but I am sure that has to be some work around , perhaps (show and hide capsule or something... ) I have to refresh my mind first smile.png . I have to go now , but I will look at this problem when I come back.

Posted

What I did (in the past) with this is to show the mesh before picking, then hide it right after and it'll never be seen but do it's job. It doesn't take a whole iteration for the show to take hold or anything.

  • Upvote 1

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.

×
×
  • Create New...