Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Transformations  (Read 1872 times)
0 Members and 1 Guest are viewing this topic.
Offline Breakfast

Senior Duke




for great justice!


« Posted 2002-10-21 19:55:34 »

I have my method that is called like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
 ... initialize rotationinterpolator ... 
 rotator1.setSchedulingBounds(bounds);
 RotTrans.addChild(rotator1);
 ... blah blah blah ....
 FTrans= new TransformGroup();
 boxer=new TransformGroup[2];
        boxer[0]=new TransformGroup();
        boxer[1]=new TransformGroup();
   .... initialize tgs as usual ...
 FTrans.addChild(boxer[0]);
 FTrans.addChild(boxer[1]);

FBehaviour ourFB=new FBehaviour( FTrans, RotTrans, oxer);

So the FBehaviour begins like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
public FBehaviour(TransformGroup newTG, TransformGroup camTG, TransformGroup[] flurry)
    {
        ourTG=newTG;     // first TG
        worldTG=camTG;  // second TG
        fSet=flurry;           // the objects to be transformed.
        WakeupCriterion criterionArray[] = new WakeupCriterion[3];
        criterionArray[0] = new WakeupOnElapsedFrames( 20);
        criterionArray[1] = new WakeupOnTransformChange(ourTG);
        criterionArray[2] = new WakeupOnTransformChange(camTG);
       
        goat=new WakeupOr(criterionArray);    
    }

And when it is running, nothing happens. The only wakeup criterion that does anything is the WakeupOnElapsedFrames one- the other two are just sat there.

My guess is that it is because I have copied the TransformGroups and I have local non-live versions of them. How can I trigger my behaviour off the live version, or keep tabs on it's transform3D?
Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2002-10-24 03:16:47 »

One of the most common reasons for Behaviors not firing is that they
are outside of your activation sphere.

Behaviors are clipped just like everything else on the tree.


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #2 - Posted 2002-10-24 05:48:15 »

J3d really could do with a debug mode where behaviour's bounds and properties are shown visually, there seems to be too much to go wrong without any real clues as to whats up.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Breakfast

Senior Duke




for great justice!


« Reply #3 - Posted 2002-10-24 07:57:47 »

Quote
One of the most common reasons for Behaviors not firing is that they
are outside of your activation sphere.

I will check this out but as it is a simple program I am using one set ouf bounds for the whole thing and they are set to something really big. This is currently a "helloTransformWorld" type program.

Also, if the Transformgroups I am handing to the behaviour are active would that not mean that the behaviour was triggered by them whereever they were? Of course, it could be that I'm just not getting this at all- it has been known...
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (41 views)
2014-10-17 03:59:02

Norakomi (33 views)
2014-10-16 15:22:06

Norakomi (26 views)
2014-10-16 15:20:20

lcass (30 views)
2014-10-15 16:18:58

TehJavaDev (60 views)
2014-10-14 00:39:48

TehJavaDev (60 views)
2014-10-14 00:35:47

TehJavaDev (50 views)
2014-10-14 00:32:37

BurntPizza (66 views)
2014-10-11 23:24:42

BurntPizza (38 views)
2014-10-11 23:10:45

BurntPizza (80 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!