Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Help with a simple ship project of mine

admiralsmith
Registered User
Quote
2023-03-26 21:38:27

Awesome. That seems to have fixed that particular issue.
Currently another has appeared that the previous did not if I recall.

Basically what I want is when I press the W key once, the object moves forward at half speed and it should speed up to full speed if I press W again ( *which is does for the most part, so this part is good.)

It should slow to half speed when I press the S key, then if I press it again, it stops completely. After I press the S key once more, it starts moving in reverse and only when I press the W key once does the object come to a stop once again. This is where it main issue lies.

When the object is traveling and I press the S key it immediately moves in reverse instead of coming to a stop and then moving in reverse.

*I say 'for the most part' because while the camera now follows the object, it still wants to slowly orbit said object despite there being no such values set in its settings.


VP
Guest
Quote
2023-03-26 23:10:48

Don't use a 3rd person camera with follow,use a simple camera with fixed position, and child it to the ship model. When you press "S", windows key-repeat may be pressing it multiple times, that's why I recommended "on key release" instead.


Guest
Guest
Quote
2023-03-26 23:47:20

@admiralsmith

Yeah I figured that is what you wanted but not how you wrote it in your post so I followed that instead. It's a simple fix. Have it to you shortly.


admiralsmith
Registered User
Quote
2023-03-27 01:26:47

VP wrote:
Don't use a 3rd person camera with follow,use a simple camera with fixed position, and child it to the ship model. When you press "S", windows key-repeat may be pressing it multiple times, that's why I recommended "on key release" instead.


I'll check it out. Also stinky keys is turned off (I dont have it enabled) so I dont think that would be causing it.


admiralsmith
Registered User
Quote
2023-03-27 01:29:44

Guest wrote:
@admiralsmith

Yeah I figured that is what you wanted but not how you wrote it in your post so I followed that instead. It's a simple fix. Have it to you shortly.


Ah thanks. Yeah I'm fairly poor at describing things haha.
Appreciate the help.

Basically what I want to go for is what other naval warship games have, like Modern Warships, Pacific Warships, and Naval Creed: Warships. (They all have essentially the same mechanics.)


Guest
Guest
Quote
2023-03-27 02:38:18

Try this one out and let us know if it works:

https://files.catbox.moe/21ewoi....

I've never played any naval warship games that I can recall. Closest I've gotten is probably Assassins' Creed: Black Flag. Probably still my favorite AC game. Need to try the Viking one out eventually but I'm burnt out on the series and Ubisoft in general. Anyway I hope this one works out for you.


admiralsmith
Registered User
Quote
2023-03-28 04:22:44

Guest wrote:
Try this one out and let us know if it works:

https://files.catbox.moe/21ewoi....

I've never played any naval warship games that I can recall. Closest I've gotten is probably Assassins' Creed: Black Flag. Probably still my favorite AC game. Need to try the Viking one out eventually but I'm burnt out on the series and Ubisoft in general. Anyway I hope this one works out for you.


The ones I mentioned are modil cames mind you, but yeah, I heard a lot about black flag and I've been needing to check it out lol.

Btw, it seems that the camrea rotating issue is still here. So check these out:

https://drive.google.com/file/d/...

https://drive.google.com/file/d/...

https://drive.google.com/file/d/...

https://drive.google.com/file/d/...

Seems we have the main motions working decently tho.
I also had a simple bobbing animation going but removed it because I thought thet that was causing the above issue, however that doesn't seek to be the case.


Guest
Guest
Quote
2023-03-28 05:04:18

The camera rotation is happening because you are using an action to move the boat when my script already handles the movement. You are changing the position with an action in the x-axis but the boat is moving forward in the z-axis so it appears to rotate the camera. The action properties I included with the behavior were intended to not move the boat, but do things like set variables, change animations, run scripts, etc. Sorry for the confusion. Let me know if not using that change position action clears up any of those other errors. I am not certain why sphereMesh1 is undefined. It's not in my behavior.


Guest
Guest
Quote
2023-03-28 19:10:48

Btw last night when I looked into your issue I tried a few things with rotating the boat (sphere) and didn't get any results I liked. Do these warship games have a ship that just moves in one direction or can they move freely? Might need to consider how you plan on doing that part. I've not messed with the 3rd person camera enough to know the easy way to accomplish that. I normally stick to first-person games. My code will need to be updated to include rotation and movement in the direction you are facing if you plan on having that a ship that moves all over the place. Just let us know.


admiralsmith
Registered User
Quote
2023-03-28 20:37:10

Guest wrote:
The camera rotation is happening because you are using an action to move the boat when my script already handles the movement. You are changing the position with an action in the x-axis but the boat is moving forward in the z-axis so it appears to rotate the camera. The action properties I included with the behavior were intended to not move the boat, but do things like set variables, change animations, run scripts, etc. Sorry for the confusion. Let me know if not using that change position action clears up any of those other errors. I am not certain why sphereMesh1 is undefined. It's not in my behavior.


Ahh okay that makes sense. I removed those properties and it works perfectly now.

Also you may have missed this before, but I already mentioned that I used "sphereMeshq" because cubeMesh1 was used in the tutorial I followed here:
https://www.ambiera.com/coppercube/doc/index.html

Should I remove the behavior file I used from the tutorial?


Guest
Guest
Quote
2023-03-28 20:56:02

Yeah if you're not using that behavior file for anything important than I would remove it to clear up the console for errors that matter.


admiralsmith
Registered User
Quote
2023-03-28 22:51:09

Guest wrote:
Yeah if you're not using that behavior file for anything important than I would remove it to clear up the console for errors that matter.


Seems like that wasn't it so it may be something else then.
Anyway, here is a short example video of Modern Warships that has most of the movements that I would like to replicate:
https://drive.google.com/file/d/...

For camera movement, the camera needs to orbit the object rather than rotating itself.
I may have found a way to do just this via the "Model Viewer Camera" behavior but there seems to be some confliction behind it and the 3rd Person Camera" behavior.

Basically, I am able to orbit, however, it behaves like its forced into a stationary position so it cannot move.
However, I'm unable to locate any option that may be causing this issue in order to enable the ability for the camera to move freely.

After we fix this issue, I also need to prevent it from looking under the water, basically prevent its Y axis from going into the negative value so it remains on the surface.


Guest
Guest
Quote
2023-03-29 00:04:34

You can only use one camera at a time, but I think the Model Viewer Camera is meant to be stationary. I've not used it for anything. I looked at the video and see what you mean. I'll do some tests on it tonight. For the error about the sphereMesh I am likely going to need to see your project to see what is happening. I am not certain what all you have going on in the scene.


admiralsmith
Registered User
Quote
2023-03-29 18:07:26

Guest wrote:
You can only use one camera at a time, but I think the Model Viewer Camera is meant to be stationary. I've not used it for anything.


Ah ok ok. That would make sense. However I'm unable to move the camera around. So I guess putting two different behaviors in the same camera wont work?

quote]Guest wrote: I looked at the video and see what you mean. I'll do some tests on it tonight. For the error about the sphereMesh I am likely going to need to see your project to see what is happening. I am not certain what all you have going on in the scene.[/quote]

The error isn't note worthy and I dont think its anything to worry about at the moment. But it may be a good idea to fix it now so it doesn't become a problem later on. However I'm unsure which associated files you would need since it may come from the extentions or behaviors instead of the scene file itself.


Guest
Guest
Quote
2023-03-29 19:00:46

Two different camera behaviors can work so long as they do not conflict. Normally this means something like keys/buttons that are used by both. Last one overwrites, I believe. I meant only one camera can be active at a time, but now we have split screen in the JS API so that is technically not true now.

If you need to send your project then put your ccb file in a folder with whatever resources it uses and zip it. Don't send the exe as that is just extra mbs and lots of people have poor internet connections on here (myself being one).

About the error: it is noteworthy because learning to track down and manage errors is vital to game design and programming in general.

In the words of Warhammer 40k: "Suffer no error to live."


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Interna?ional" (you are not logged in)


Text:

 

  

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


   






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