Remember me
You are here: HomeForumCyberix3D ForumGeneral Discussionnew twitter account.
Welcome, Guest
Username: Password: Remember me

TOPIC: Strange behavior of Car Demo Project in APK

Strange behavior of Car Demo Project in APK 7 years 11 months ago #813

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
Hello,

I have started to modify official Car Demo Project (from Editor menu) in order to make a birthday game-gift for my little cousin but it seems that the car model is behaving strangely in APK version.

In Flash version the car is going straight but in APK version it's always gradually turning to the right. It can't keep the straight line, the behavior is similar to the real-life car behavior if one of the tires are defective.

Is this a problem with my tablet or is it a problem with a car code? :(
The administrator has disabled public write access.

Strange behavior of Car Demo Project in APK 7 years 11 months ago #814

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 703
  • Thank you received: 697
This is because the car is using accelerometer by default for steering so you don't have to use the joystick to steer the car.
If you want to disable the accelerometer, you can disable the car's automatic keys and use your own inputs.
You can see an example here:
www.gamemaker3d.com/forum/general-discus...ment-racing-game#771
You can also add your own custom buttons and it will disable the automatic joystick and buttons that are being added.
Regards,
Cyberix3D
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

Strange behavior of Car Demo Project in APK 7 years 11 months ago #815

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
Thank you for reply, I tried it and it worked, the car is going forward without any turns in APK :)

...but it's almost unplayable with the the new controls, left button is positioned on the right, the reset button is next to forward button and above reverse button... it's a mess :(

If the new buttons can't be rearranged is there a way to compensate for accelerometer, something like: if the object is moving set vehicle steering -0.01 ?
The administrator has disabled public write access.

Strange behavior of Car Demo Project in APK 7 years 11 months ago #816

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 703
  • Thank you received: 697
You can add your own custom controls by dragging a joystick and buttons to the game area.
The default controls wouldn't appear as long as you are using your own controls.

You can change the vehicle steering by changing the vehicle's properties like in the example we gave you:
www.gamemaker3d.com/forum/general-discus...ment-racing-game#771

BTW, You can create your own custom car by following the examples in this forum thread:
www.gamemaker3d.com/forum/examples/147-custom-vehicles

Good luck with your birthday game-gift.

Regards,
Cyberix3D team
The administrator has disabled public write access.
The following user(s) said Thank You: Ganderoleg

Strange behavior of Car Demo Project in APK 7 years 11 months ago #819

  • Ganderoleg
  • Ganderoleg's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 115
  • Thank you received: 12
Yes, I tried joystick with custom keys and it worked out great, even added a little 'Wait' line of code to prevent left/right increment after 0.2 sec :)

I tried to replace the car with another model but it was not so easy so I just placed new model on top and made default car invisible :lol: It worked out fine:

www.gamemaker3d.com/player?pid=051530022366

I still have to delete Police lights from a top of the car and experiment with car's texture but gameplay is now more important.
The administrator has disabled public write access.
Time to create page: 0.077 seconds