Crystal Space
Welcome, Guest. Please login or register.
October 25, 2014, 10:09:46 pm

Login with username, password and session length
Search:     Advanced search
9011 Posts in 2044 Topics by 8828 Members
Latest Member: Saikjanna
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Game Content Creation
| | |-+  dynamic HitBeamResult?
« previous next »
Pages: [1] Print
Author Topic: dynamic HitBeamResult?  (Read 3140 times)
Panch
Jr. Member
**
Posts: 80


View Profile Email
« on: July 15, 2007, 05:26:33 am »

Hello all,

I currently have 2 functioning weapons in my FPS, the basic laser from mazing, and an actual projectile that I've built. But when I try to get a HitBeamResult of the projectile mesh it's just not returning anything:
Code:
void Time::CheckHit (iMeshWrapper* WeaponSprite)
{
csSectorHitBeamResult rc = WeaponSector->HitBeamPortals (
  WeaponStart, WeaponSprite->GetMovable()->GetFullPosition());

Is the code for the rc, but when I check rc.mesh, I don't seem to hit anything. I don't want to simply do:
Code:
void Time::CheckHit (iMeshWrapper* WeaponSprite)
{
csSectorHitBeamResult rc = WeaponSector->HitBeamPortals (
  WeaponStart, WeaponEnd);

Because then the rc will be a straight line and the hit will occur before my weapon mesh intersects the target mesh which isn't what I want for the projectile. It's ok for the laser because the laser uses a static mesh.

Any ideas?

TIA! Smiley
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: July 17, 2007, 08:43:09 am »

What kind of mesh are you using? Can you describe a bit more what exactly you are doing? I'm not sure I understand the problem fully.

Greetings,
Logged
Panch
Jr. Member
**
Posts: 80


View Profile Email
« Reply #2 on: July 17, 2007, 09:15:18 pm »

Hey Jorrit,

Thanks for the response. I recently figured it out, the mesh was a genmesh generated in-code. The only problem was that I was checking for collision at the time of mesh animation start, not during (each frame). Once I added the CheckHit function to my Handle function which gets processed each frame it works just fine!

Thanks Smiley
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.252 seconds with 15 queries.