ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator Invert Y axis on mouse?
person icon
drog3
Registered User
Quote
2025-06-19 15:16:04

I believe this has been asked before, but after searching for a bit I haven't found and answer. I'm very new to Coppercube and have been enjoying working on my own little adventure game for a short time. I usually game with my mouse (Y axis) inverted so that when I pull back towards me, the image goes up, (like the yoke of an airplane). Does anyone know how to achieve this in Coppercube? And could you give me an idea of how to implement it? I have zero JS skills, and don't even really know where to put a script should I have one.
Any help would be appreciated, and again, sorry if this has been asked before and I haven't been able to find it.
My brain is getting cooked from trying to adjust to the flipped Y axis movement!!! :P

person icon
okeoke
Registered User
Quote
2025-06-20 08:14:28

Hi,

Take a look at https://www.ambiera.com/coppercu.... There is an extension called "Drag 3D Object with constraints". Also there is a guide on how to install and use it in your game on the bottom of the same page.

This extension doesn't support inverting mouse movement though, and, unfortunately, there is no way how you can achieve it without coding or modifying the existing extension.

I would suggest just using this extension accepting the limitation it has, in case inverting mouse is not critical feature for your project:) Otherwise you can try the following:
* add two variables
var lastMouseY, posY;
* modify draggingFunc to something like:
  var mouseX = ccbGetMousePosX();
var mouseY = ccbGetMousePosY();

// new part
if (!posY) posY = mouseY;
posY -= mouseY - lastMouseY;
lastMouseY = mouseY;

// update position
var pos3d = ccbGet3DPosFrom2DPos(mouseX, posY);

* add another action that unregisters dragging function on click to empty space. Check if currentlyDraggingAction is not null and call stop dragging. In order to do so you need to make stopDragging a function instead of action_Drag3DObject_axis method.

You can also try to feed the original action to ChatGPT along with this reply and your original post. I think there is a good chance it will update everything properly.

person icon
drog3
Registered User
Quote
2025-06-20 16:51:42

Wow! Thanks so much for the reply! I was honestly hoping it would be something a bit more simple, but I'll look into the suggestions you've made. Maybe I can just train my brain to be ok with the Y axis movement the way it is. :)


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |