Logic Transform Buildbox 2

Logic Transform – Buildbox 2

 

  • The logic transform piece is available in the scene editor under the logic section just click and drag the transform icon into your scene to add it to your game



  • This is an invisible game piece but it allows you to modify the properties for an existing asset in your scene specifically you can modify the position rotation scale linear velocity or angular velocity of an asset within your game

 

  • This is an invisible item in your game players won’t see it they’ll just see the effects of it played out so let use this piece to modify the enemy here let’s take a quick look at this enemies properties right now you see that the enemy just has a fixed position and scale but then you have movement that’s added

 

  • It looks like the enemy is going to be travelling forward at a speed of 2 so say that wanted that enemy to change direction once it hits this logic piece so that the enemy would come forward and then move backward after interacting with this logic piece you could set up the modifiers there to do just that in this case to change the linear velocity modifier to negative 2 and then change the affected asset to be the enemy

 

  • The transform logic piece is going to replace the linear velocity of this particular enemy so currently it’s set to 2 meaning that the enemy is moving forward at a speed of 2 and once it interacts with this logic piece it’s going to change the enemy’s linear velocity to negative 2 sending the enemy backward and scale this up just a little bit and move this over and let’s play it

 

  • You can see very quickly that it did exactly what you wanted it to do once the enemy hit this logic piece it turned around and went back the other direction let’s add another logic piece and make this a little more interesting so you’ll bring this in this transform logic piece and you add this back over here move our enemy forward just a little bit so that you’re not collided with that piece and then again it changed the linear velocity modifier to two so that the enemy moves forward once it hits this logic piece

 

  • And also change this scale so let’s set the scale of the enemy to be two whenever it interacts with this logic piece let’s play it through and see what happens so you have the enemy hit the first logic piece and the second one and it scales you can see how you can make lots of changes to the interactions of items in your scene using this invisible transform logic piece

 

  • The linear velocity modifier and scale modifier values would be added to the enemy’s existing values for those particular traits so if you look again at the enemy’s values when it’s coming backward toward this logic piece it’s currently going to be moving at negative two because it’ll interact with this logic piece and then move backwards at a rate of negative two so on this logic piece before it hits it if you are to set this to add that would mean that you would add the linear velocity modifier of a value of two to the enemy’s linear velocity of negative two effectively canceling out the enemy’s linear velocity

 

  • The linear velocity of the enemy which was moving at negative meaning that the enemy effectively stops you have a couple different options with the effect operation here you can set to add where the logic transform piece adds the values of the modifier to the existing assets values multiply where the existing value of the asset is multiplied by the modifying value of the logic transform piece or replace which is what you did in your first example lots of customization options hope you check it out and have fun with the logic transform piece

Leave a Comment

Your email address will not be published. Required fields are marked *