Eric
-
Posts
30 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Eric
-
-
Ok once I have the Yaw Angle.. Which I Do... How do I use the AddBodyTorque and CalcBodyOmega to turn the Model only on the Y Axis to face the calculated Yaw Angle...
Nothing I seem to Try Works
float Angle=atan2(Position.X-PreviousPos.X,Position.Z-PreviousPos.Z) * 180 / PI; AddBodyTorque(Model,CalcBodyOmega(Model,Vec3(0,Angle,0))*ModelMass,0);
This is my latest try...but I'm getting something wrong.
Is this the right way to Apply Torque only on the Y axis?
Thanks,
Eric
-
Yes I'm looking at those commands but what I can't figure out is what to put in the CalcbodyOmega Rotation field .... If I am applying a force and my Model starts to move, how do I know what information to enter in the rotation vector to make sure it points in the direction of movement?
Thanks,
Eric
-
Does anyone have some insight on turning a model using the command AddBodyTorque to point in the direction the Model is moving.
Thanks for any help,
Eric
-
Does anyone use Code Blocks... I moving from BlitzMAx to C++ I know big jump... I'm really like the Code Blocks IDE, but I can't seem to configure it for LeadWerks.. Probably because I'm such a noob.
Can anyone help?
Thanks,
Eric
-
You need the UV coordinates of the area that you want to draw, then you need the GL_TEXTURE_CORD_ARRAY state and you need to use glTexCoordPointer, and glVertexPointer and glDrawArrays to draw your image.
You can use my little 2d library if you want, it gives alot of nice drawing functions, like frames of images like in blitzmax native 2d stuff, a fast image text system, and some other stuff that makes life easyer with 2d,bmx and leadwerks.
PM me if you want it
edit:ooops that thread is very old...
Thanks... I sent you a message.
Eric
-
Yeah I wonder how I missed that Command. Thanks
-
I have a terrain and physics objects... It seems if I go off the edge of the terrain or go too high in elevation the physics objects freeze.
Can I change this?
-
How can I select and draw a portion of an Image. I have a 1024 x 1024 Image that consists of various buttons and display parts,
Currently I use this code to Draw and Rotate an Image, but I am unsure how to select a section of my image to draw.
Function DrawAndRotateImage(itr:TTexture, Ax:Int, Ay:Int, Sx:Int, Sy:Int, Ir:Float) glMatrixMode(GL_TEXTURE) glLoadIdentity() glTranslatef(0.5,0.5,0) glRotatef(Ir,0,0,1) glTranslatef(-0.5,-0.5,0) glMatrixMode(GL_MODELVIEW) glEnable itr.Target() itr.Bind() itr.Clamp(1,1,1) DrawRect(Ax,Ay,Sx,Sy) glDisable(GL_TEXTURE_2D) glMatrixMode(GL_TEXTURE) glLoadIdentity() glMatrixMode(GL_MODELVIEW) glScalef(1,1,1) End Function
How can I add to this code to allow me to select a portion of the image.
Thanks for any help.
Eric
-
Yeah, Actually I just downloaded Visual C++ 2010... Can't seem to get it set up properly though. But in any case, I can certainly convert it to Blitzmax.
I do want to start to learn C++, It can't be that hard.
Thanks for your offer.
Eric
-
I will work on this...Thanks for the Ideas.
I have to admit I'm a novice so if there is code examples you can share.. please let me know
@ Laurens Would you share your code?
-
Can some one point me in the right direction to make a Laser Beam/Tractor beam effect... A glowing beam looking thing.
Do coronas actually work.. What do I need to do? Because I can't seem to get them to show up.
Do I have to use the Framework? "Create Framework" I don't use it.
Any help on this effect would be greatly appreciated.
Thanks in Advance.
Eric
-
If I create a Ball joint between two Bodies, The first body is a box with mass 1 sitting on the "Ground" I have another body that is moving past it and above it.
When I create the joint how is it oriented in relation to the two Bodies? I assume the ends are at the parent and child but the Position of the "Pin" If I use Vec3(0,-1,0) Where does the pin get created? Is it local to the parent? I can't seem to get these things to work.
Basically, I want the Child to kind of dangle below the Parent, allowed to swing .
I hope I made sense.
Any insight would be greatly appreciated.
Thanks,
Eric
-
Macklebee,
Perfect...Thanks for your help.
Eric
-
the lua script 'utilities.lua' shows how to get the parent/model of the mesh... or search for GetMeshModel in the forum search and you should find examples of getting the model/body from the picked mesh...
I work in BMax.. and I can't seem to get this to work.
Function GetMeshModel:TEntity(entity:TEntity) While entity <> Null If GetEntityKey(entity, "class") = "Model" return entity End If entity=entity.parent Wend End Function
-
Josh,
DO you have a small sample?
Thanks,
Eric
-
The Line pick can pick a mesh of a Model but how do you take that information and find the body of the picked Mesh?
Thanks,
Eric
-
I think it had something to do with my obj exporter from blender... They just release Version 2.55 and the exporter works now.
So all is good now... thanks everyone for your help.
I thought I was going mad!!
Eric
-
OK...so I want to use the .SBX file... How do I go about that? I know how to create my terrain, and I can load it in.
How do I parse it?
I don't need to worry about anything other than the terrain... No object, lights, vegetation or light. Just the terrain and the textures.
Thanks,
Eric
-
The heightmap and alphamap are saved to the same folder as the SBX file... MAPS. The textures used are kept in the Materials Folder under the Terrain folder.
If you are wanting to paint details into your terrain then I would suggest that you use the editor.
and the wiki has info for the Terrain commands, but all of this can easily be just achieved by just loading the scene/SBX file.
Is there more overhead using a Scene/SBX file?
The Textures are in the materials folder... Can I move these to my own project folder? I'm a little confused as to the layout of this.
Thanks,
Eric
-
When I save the terrain from the editor..after adding a texture.. I get the SBX file... but where are all of the textures saved too?
If all I want is a textured terrain, is it better to load the heightmap and add the textures in code or load the SBX file?
How does all of this work.
Is there a Manual for Leadwerks engine? I saw the editor manual. But I'm looking for a language manual.
Is there a terrain tutorial?
Thanks,
Eric
-
when in the modelviewer, click on the Surfaces shown in the treelist on the left. It will tell you what your material name is... if nothing is defined there then you do not have your textures set correctly in blender... open up a working model like the oildrum.gmf for comparison...
Yeah there is nothing there... darn... now I need more time to figure out blender. Nothing is simple!! hahahah
I just don't understand that the .mtl file exported with the .obj file contains the correct materials.
Back the the drawing board.
-
Try loading the gmf up inside the leadwerks model viewer and see if the material names show up. The main issue I had was the .mat wasn't matching the name of the material inside blender.
If this doesn't make any sense, I'll check and post some screenshots of what I mean when I get home.
I just get the model with no textures in the model viewer.. I check the .dds maker and it is set up properly with Mipmaps and DXTC5 formating.
If you have been successful exporting Blender into LE I would appreciate any help you can offer.
I tried again last night with a simple cube... No luck.
Thanks,
Eric
-
Does blender accept the dds format? I had no luck with it, in fact I still can't figuer how to get a texture onto an object in Blender.
Yes it accepts .dds files... I have been learning myself... I watch as many youtube videos as I can. I only started to use it a few months ago and I find it great now that it is in Version 2.5.
Is the DDS in DXTC5 with mipmaps? Can you post the content of Cube.Mat?
Here is the Mat File
texture0="abstract::Untitled.dds"
shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse.frag"
The Actual image is Untitled.dds not texture.dds ... I made a mistake on my earlier post.
Thanks,
Eric
-
Is the DDS in DXTC5 with mipmaps? Can you post the content of Cube.Mat?
OK I will have to do that when I get home later tonight.
I know that I converted my original texture to a .dds using the Leadwerks tool.
Thanks for responding.
Eric
Turning an Model to face the direction it is moving
in Programming
Posted
Got it... Whew!!