sidebar features
sidebar content

Go Back   Blender Artists Forums > Game Engine > Game Engine Resources

Reply
 
Thread Tools
-[Killer]-'s Avatar
-[Killer]- -[Killer]- is offline
Member
 
Join Date: Jan 2007
Location: Florida
Posts: 3,581
Here's a quickie...

Create a plane in front view.
Apply saber texture
Go into edit mode and hit "R, X, 90" to rotate 90 degrees on the X axis.
Go into object mode and hit "R, X, -90" to bring the saber to it's original axis
Here's your logic brick for your saber:

ALWAYS_____AND_____Edit Object: Trackto: Camera

leave the default settings.

What you did was make the logic setup think that the saber is facing the camera by rotating in edit mode which rotated the axis 90 degrees. Making the top, the front.

Here's the .blend:
http://www.mediafire.com/?0s9xe1t9c4m

ENJOY and give good feedback
............................................
Omg, I finally changed my avatar again! Yes, that's me With my guitar and before you ask, yes I have makeup on.

NEED MORE UPLOAD SPACE FOR YOUR BLENDER FILES? CLICK HERE TO GO TO THE BLENDER FILE UPLOADER!!!!!



Resources: Real-Time Motion Blur, Ragdoll, Maze AI, GeFX

Blender Artists Free Script Repository


Tower Siege 2


MEDIACHICKEN BLOG
#1   Old 22-May-08, 18:47   
Reply With Quote


B3D00's Avatar
B3D00 B3D00 is offline
Member
 
Join Date: Mar 2008
Posts: 2,428
That has the same problem as I have. You put a hilt under it (tested both parented and unparented), put the cam up and..
If you could make to just track on Z axis... It's possible, with python. (getOrientation(cam))
saber.setOrientation(cam), restricting to Z axis... I'm not an expert on python.
If you use billboard faces, when you rotate the saber the blade won't.
............................................
Where to start in Python
#2   Old 22-May-08, 19:57   
Reply With Quote
Captain Oblivion's Avatar
Captain Oblivion Captain Oblivion is offline
Member
 
Join Date: Jan 2006
Location: MA (USA)
Posts: 1,774
though it's a LOT easier to just duplicate the saber face (in edit mode) and rotate it 90 degrees (on the z axis) so it makes a looong thin x- looks fine from any angle (except straight on, but billboard faces also have that problem) also, this gives it the appearance of volume.
............................................
God kills a kitten every time someone makes a pointless thread

Balsa man and sulfur girl make a perfect match
#3   Old 22-May-08, 21:10   
Reply With Quote
-[Killer]-'s Avatar
-[Killer]- -[Killer]- is offline
Member
 
Join Date: Jan 2007
Location: Florida
Posts: 3,581
Download my blend.... I have a camera animation going 360 degrees around the saber. Thats why I posted it. And no... you can add a hilt. I don't wanna model an entire hilt and blade but if that's what it'll take to convince you it works I guess I will =[ and yes it's constrained to the Z axis. And if it's not constrained for you with default values then try to add a constraint to it under the object tab? or something under the constraint tab and hit track to Camera and hit Z
............................................
Omg, I finally changed my avatar again! Yes, that's me With my guitar and before you ask, yes I have makeup on.

NEED MORE UPLOAD SPACE FOR YOUR BLENDER FILES? CLICK HERE TO GO TO THE BLENDER FILE UPLOADER!!!!!



Resources: Real-Time Motion Blur, Ragdoll, Maze AI, GeFX

Blender Artists Free Script Repository


Tower Siege 2


MEDIACHICKEN BLOG
#4   Old 22-May-08, 21:25   
Reply With Quote
Captain Oblivion's Avatar
Captain Oblivion Captain Oblivion is offline
Member
 
Join Date: Jan 2006
Location: MA (USA)
Posts: 1,774
I think you missed our points- with your method (which is a manual hack for billboards- much easier to just assign billboard in the face settings) if you parent it to a hilt, and rotate that hilt, the blade doesn't turn. your method only works if the blade stays in exactly the same orientation. also, I think your method is harder on the computer, but I haven't stress tested it yet, so don't quote me on that...
............................................
God kills a kitten every time someone makes a pointless thread

Balsa man and sulfur girl make a perfect match
#5   Old 22-May-08, 21:45   
Reply With Quote
-[Killer]-'s Avatar
-[Killer]- -[Killer]- is offline
Member
 
Join Date: Jan 2007
Location: Florida
Posts: 3,581
I'm not sure I understand fully... my method is just like stationary ones 'cept it moves.
............................................
Omg, I finally changed my avatar again! Yes, that's me With my guitar and before you ask, yes I have makeup on.

NEED MORE UPLOAD SPACE FOR YOUR BLENDER FILES? CLICK HERE TO GO TO THE BLENDER FILE UPLOADER!!!!!



Resources: Real-Time Motion Blur, Ragdoll, Maze AI, GeFX

Blender Artists Free Script Repository


Tower Siege 2


MEDIACHICKEN BLOG
#6   Old 22-May-08, 23:01   
Reply With Quote
Captain Oblivion's Avatar
Captain Oblivion Captain Oblivion is offline
Member
 
Join Date: Jan 2006
Location: MA (USA)
Posts: 1,774
all right, lemme try again.

-have you tried making a handle, which is the parent of the blade? if not, do this. you don't need to model out a complete handle, just use a cube (duh)
-now give this handle rotation on the x or y axis (IPO or just an actuator)
-run the game. notice how the blade rotates with the handle?
that's the problem. it doesn't. by the way, your method is exactly the same as setting the faces to billboard, but it takes more effort and probably causes more slowdown.

it's overall more effective and easier to do the x blade thing, until billboards in blender work properly.

here's what I mean
............................................
God kills a kitten every time someone makes a pointless thread

Balsa man and sulfur girl make a perfect match

Last edited by Captain Oblivion; 23-May-08 at 15:22.
#7   Old 23-May-08, 15:20   
Reply With Quote
-[Killer]-'s Avatar
-[Killer]- -[Killer]- is offline
Member
 
Join Date: Jan 2007
Location: Florida
Posts: 3,581
Just do the same to the hilt as you did to the saber. (so it doesn't go outa orbit)

Not too difficult..
............................................
Omg, I finally changed my avatar again! Yes, that's me With my guitar and before you ask, yes I have makeup on.

NEED MORE UPLOAD SPACE FOR YOUR BLENDER FILES? CLICK HERE TO GO TO THE BLENDER FILE UPLOADER!!!!!



Resources: Real-Time Motion Blur, Ragdoll, Maze AI, GeFX

Blender Artists Free Script Repository


Tower Siege 2


MEDIACHICKEN BLOG
#8   Old 23-May-08, 20:02   
Reply With Quote
Captain Oblivion's Avatar
Captain Oblivion Captain Oblivion is offline
Member
 
Join Date: Jan 2006
Location: MA (USA)
Posts: 1,774
okay, so now neither of them rotate. this solves things... how?
............................................
God kills a kitten every time someone makes a pointless thread

Balsa man and sulfur girl make a perfect match
#9   Old 24-May-08, 00:31   
Reply With Quote
-[Killer]-'s Avatar
-[Killer]- -[Killer]- is offline
Member
 
Join Date: Jan 2007
Location: Florida
Posts: 3,581
??? set them BOTH!!!! to track the camera... god dude pay attention...
............................................
Omg, I finally changed my avatar again! Yes, that's me With my guitar and before you ask, yes I have makeup on.

NEED MORE UPLOAD SPACE FOR YOUR BLENDER FILES? CLICK HERE TO GO TO THE BLENDER FILE UPLOADER!!!!!



Resources: Real-Time Motion Blur, Ragdoll, Maze AI, GeFX

Blender Artists Free Script Repository


Tower Siege 2


MEDIACHICKEN BLOG
#10   Old 24-May-08, 03:48   
Reply With Quote
Captain Oblivion's Avatar
Captain Oblivion Captain Oblivion is offline
Member
 
Join Date: Jan 2006
Location: MA (USA)
Posts: 1,774
if they're both set to track camera (which is what I did) then they both are FORCED to stay upright, REGARDLESS of any rotation the SHOULD have. that's how the track WORKS. did you actually try your suggestion before telling us to? here, let me show you.
note how only the x method blade works right. funny, that.
............................................
God kills a kitten every time someone makes a pointless thread

Balsa man and sulfur girl make a perfect match
#11   Old 24-May-08, 04:32   
Reply With Quote
-[Killer]-'s Avatar
-[Killer]- -[Killer]- is offline
Member
 
Join Date: Jan 2007
Location: Florida
Posts: 3,581
I understand that... why would you rotate your saber? You just swing your arms.
............................................
Omg, I finally changed my avatar again! Yes, that's me With my guitar and before you ask, yes I have makeup on.

NEED MORE UPLOAD SPACE FOR YOUR BLENDER FILES? CLICK HERE TO GO TO THE BLENDER FILE UPLOADER!!!!!



Resources: Real-Time Motion Blur, Ragdoll, Maze AI, GeFX

Blender Artists Free Script Repository


Tower Siege 2


MEDIACHICKEN BLOG
#12   Old 24-May-08, 04:33   
Reply With Quote
Captain Oblivion's Avatar
Captain Oblivion Captain Oblivion is offline
Member
 
Join Date: Jan 2006
Location: MA (USA)
Posts: 1,774
/facepalm

if you swing the arms, the blade stays upright

that's the point of the first version (I'll re-upload it if you like- it got replaced by the newer one), showing how the parent (be it the handle, the arm, whatever, the GE doesn't care) can rotate, but the blade always stays aligned to the global Z axis. the only way to change this is if you made a tracking script manually in python, with the up axis dynamically matching the parent's local Z axis. this would be even more work when, so far the version that works with the least problems, takes the least setup, and probably the least system drain, is the x setup.

unless you want the blade to stay upright? if you can make a game that uses this and looks good, all power to you, but I don't see a way to do it.
............................................
God kills a kitten every time someone makes a pointless thread

Balsa man and sulfur girl make a perfect match
#13   Old 24-May-08, 04:54   
Reply With Quote
-[Killer]-'s Avatar
-[Killer]- -[Killer]- is offline
Member
 
Join Date: Jan 2007
Location: Florida
Posts: 3,581
I know what you mean by the X but then it looks like crap from some angles, ie: if the AI has a X blade when he swings to attack it looks like crap =[
............................................
Omg, I finally changed my avatar again! Yes, that's me With my guitar and before you ask, yes I have makeup on.

NEED MORE UPLOAD SPACE FOR YOUR BLENDER FILES? CLICK HERE TO GO TO THE BLENDER FILE UPLOADER!!!!!



Resources: Real-Time Motion Blur, Ragdoll, Maze AI, GeFX

Blender Artists Free Script Repository


Tower Siege 2


MEDIACHICKEN BLOG
#14   Old 24-May-08, 04:56   
Reply With Quote
vaderade vaderade is offline
Member
 
Join Date: Jun 2007
Posts: 10
I made a lightsaber in the BGE by having it fixed, but spinning on the Z axis. That way, it flickers and always faces the screen. I also made it retract and extend, with sound!
http://atomic-melvin.deviantart.com/...saber-86939815
#15   Old 28-May-08, 03:16   
Reply With Quote
-[Killer]-'s Avatar
-[Killer]- -[Killer]- is offline
Member
 
Join Date: Jan 2007
Location: Florida
Posts: 3,581
Using my tutorial? Or by using a constraint?
............................................
Omg, I finally changed my avatar again! Yes, that's me With my guitar and before you ask, yes I have makeup on.

NEED MORE UPLOAD SPACE FOR YOUR BLENDER FILES? CLICK HERE TO GO TO THE BLENDER FILE UPLOADER!!!!!



Resources: Real-Time Motion Blur, Ragdoll, Maze AI, GeFX

Blender Artists Free Script Repository


Tower Siege 2


MEDIACHICKEN BLOG
#16   Old 28-May-08, 04:18   
Reply With Quote
Captain Oblivion's Avatar
Captain Oblivion Captain Oblivion is offline
Member
 
Join Date: Jan 2006
Location: MA (USA)
Posts: 1,774
using the x method plus constant z-axis spinning, apparently- it does look good, I gotta say
............................................
God kills a kitten every time someone makes a pointless thread

Balsa man and sulfur girl make a perfect match
#17   Old 28-May-08, 15:21   
Reply With Quote
-[Killer]-'s Avatar
-[Killer]- -[Killer]- is offline
Member
 
Join Date: Jan 2007
Location: Florida
Posts: 3,581
I'm working on a new method using python to track the camera movement and to move the saber on the LOCAL Y axis. Keep checking for the new method. Also keep an eye out for a thread named "Jedi Dump" I'll post it soon with all SW resources FREE! Including textures. I have like 25 SW items done. And like 5 hilts. I'm working on a Storm Trooper and an Snow Trooper.

-Later
............................................
Omg, I finally changed my avatar again! Yes, that's me With my guitar and before you ask, yes I have makeup on.

NEED MORE UPLOAD SPACE FOR YOUR BLENDER FILES? CLICK HERE TO GO TO THE BLENDER FILE UPLOADER!!!!!



Resources: Real-Time Motion Blur, Ragdoll, Maze AI, GeFX

Blender Artists Free Script Repository


Tower Siege 2


MEDIACHICKEN BLOG
#18   Old 28-May-08, 15:47   
Reply With Quote
Captain Oblivion's Avatar
Captain Oblivion Captain Oblivion is offline
Member
 
Join Date: Jan 2006
Location: MA (USA)
Posts: 1,774
I gotta say, kudos for persistence.
............................................
God kills a kitten every time someone makes a pointless thread

Balsa man and sulfur girl make a perfect match
#19   Old 29-May-08, 03:02   
Reply With Quote
-[Killer]-'s Avatar
-[Killer]- -[Killer]- is offline
Member
 
Join Date: Jan 2007
Location: Florida
Posts: 3,581
Who me? With what making stuff?
............................................
Omg, I finally changed my avatar again! Yes, that's me With my guitar and before you ask, yes I have makeup on.

NEED MORE UPLOAD SPACE FOR YOUR BLENDER FILES? CLICK HERE TO GO TO THE BLENDER FILE UPLOADER!!!!!



Resources: Real-Time Motion Blur, Ragdoll, Maze AI, GeFX

Blender Artists Free Script Repository


Tower Siege 2


MEDIACHICKEN BLOG
#20   Old 29-May-08, 03:48   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 18:46.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists