Jump to content

emiiter crashing program


Chiblue
 Share

Recommended Posts

SORRY FOUND THE PROBLEM...

 

I am trying to create a small puff of smoke everytime I press a button, I created an emitter and used the smoke.mat/dds from the tutorial, when I "fire" the emitter my program crashes with a

 

Unhandled exception at 0x1012a441 in fpsbase-Debug.exe: 0xC0000005: Access violation reading location 0x00000038.

 

In the .Render() function...

 

I am obviously doing something wrong, I have read through the tuorial several times but do not see what I am doing that is causing the problem..

 

emitter = CreateEmitter(3,300,Vec3(0,0,1),1);

PositionEntity( emitter, Vec3(pos.X,pos.Y,pos.Z),1 );

RotateEntity( emitter, Vec3(rot.X,rot.Y,rot.Z),1);

PaintEntity(emitter,this->smokeimage);

SetEmitterVelocity( emitter,Vec3(0,.5,0.2),Vec3(0.1,0.1,0) );

SetEmitterRadius( emitter, 0.1, 0.1 );

EntityColor( emitter,Vec4(.5,.5,.5,0.1) );

SetEmitterRotationSpeed( emitter,0.1 );

 

 

Any suggestions, and I know it's probably something really stupid..

 

 

And yes the answer is that I am stupid... created a foreground world and now it works like a dream....

Edited by Chiblue

If it's not Tactical realism then you are just playing..

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...