Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Announcements and Showcase
Thirdperson Camera and Player Controller + Download

smnmhmdy
Registered User
Quote
2022-01-14 15:29:13

@coa You could try putting this line of code at the same line number I mentioned above:
this.xAxis = Math.round(this.xAxis); this.yAxis = Math.round(this.yAxis);

It's not a good solution but will fix your issue for now, I'll look into what is causing this and properly fix it in a future version :)

@csp-games Hey Dieter, good to see you! Thank you, very much true, CC and CL (Irrlicht in general) are incredibly powerful tools, specially when used correctly. I personally look at CC as a lightweight renderer, with a bunch of game engine related tools and features on top (so we don't have to worry about scene management, nodes, particles, raycasting, etc.), that way I can understand that I'm using CC as a base, and I have to implement my own stuff on top of it, which is exactly where I think people's frustration comes from.

CC is advertised as a code-free game engine in which you can create full games without writing a single line of code, I don't think that's true, CC's "visual scripting" action and behavior system may look convenient at first, but will quickly turn into an unintuitive maze of confusion, getting bigger and bigger as the game grows.

For the very same reason @veganpete had to restart his project several times because it was basically impossible to work and deal with never ending, confusingly identical windows and action boxes everywhere.

So in my opinion, if CC wants to continue being advertised as a code-free game engine, it needs to introduce a completely new visual scripting model, something like Unreal's blueprint, but people are even complaining about how blueprint gets hard to maintain on a large game, so the truth is that visual scripting is by nature confusing, most of the time written code is better left alone as written code, no fancy windows and lines pointing to different fancy windows and lines :)

Yup I remember your thread about working on a 3rd person camera controller, that was around the same time I got active in the community as well, I didn't have the opportunity to interact and learn from you, hopefully you'll come around the forum whenever you have time and share more of your knowledge with us :)


coa
Guest
Quote
2022-01-14 16:46:03

thanks! it solved the issue
and thanks for this great extension


csp-games
Guest
Quote
2022-01-14 18:35:07

smnmhmdy,

thanks, I couldn't agree more. I sure would love to stick around a lot, but these days, who's to say what's tomorrow. But that however doesn't stop me from developing today :-)


coa
Registered User
Quote
2022-09-03 18:55:04

cant praise this camera and controller extension enough! I use it in few of my games and it is very nice..congrats on it smnmhmdy


shadynl
Registered User
Quote
2022-09-09 23:09:23

Hi all,

I tried the latest version of Thirdperson Camera and Player Controller 1.8 and i like it much!
1 problem: I am unable to make a good collision event with other objects while using the physics engine. I tried about any setting, Tried to attatch a node to animated joint but without good results. I get a collision every now and then but it is far from accurate. I remember years ago i got this collision working great but im missing something and i cannot remember what it was. Can anyone tell me the correct way to set up collision with this camera behavior?

-attatch cube to node didnt work
-i definetly checked if the object had ''moved by physics engine' enabled
-character is also set to collide
-tried to disable character collision and use only the cube without result

I feel like i tried any option about now.

My problem is easy to replicate: download Thirdperson Camera and Player Controller 1.8, add a sphere to the demo and see if it behaves like it should on collision. It does not unfortunatly

small update: I set the Thirdperson Camera and Player Controller 1.8 behaviour to a simple cube and the collision wit object like a ball work fine. Then when i try to attatch my animated character it shows up in weird locations. Is it possible to fix this? If yes a huge Coppercube issue will be fixed!


shadynl
Registered User
Quote
2022-09-11 15:16:41

Is it possible for this behaviour to add a function: 'MaxHorizontalAngle'?

I have a project where i need limited, or no rotation at all. Maybe a java code to stop the rotation without messing with the rest of the behaviour in general? I need some of the features of this behaviour, otherwise i could just use a standard camera.


smnmhmdy
Registered User
Quote
2022-09-12 09:52:05

Thanks a lot @coa! Glad its been useful for your projects!

Hey @shadynl, I don't seem to be able to reproduce the first bug, can you please send a ccb file on which the bug occurs? Thanks

For the horizontal angle there is currently no built-in way to limit that, but you can easily do it by using this bit of code on an 'Every few seconds do something' (1 interval ms) action to limit it yourself.
var rangeMin = -40, 
rangeMax = 40;

smTPCAMERA.CameraActiveRotation.y = Clamp(smTPCAMERA.CameraActiveRotation.y, rangeMin, rangeMax);



shadynl
Registered User
Quote
2022-09-12 12:28:48

Thank you very much for your reply smnmhmdy.
You can download the example here: https://www.mediafire.com/file/f...

I really like the ball to move like it should using the physics setting. When i use a cube instead of my animated mesh the collision with the ball works fine. I think something is wrong with my animated mesh maybe? when i attatch a cube to an animated joint and set collision weird stuff happens.
check it out and let me know. the entire gameplay depends on this:) And thanx for the lines of code, exactly what i needed!

here you can find 2 screenshot of what i tried so far. I work several years with coppercube and tried about anything now. Animated meshes and collision still are a tough cookie: https://discord.com/channels/742...

In this sample project, press w+SHIFT to run :) its fun! In case im unable to get this collision working good the game is going to be more like a 'penalty shooter' thats why i needed to limit the camera rotation but maintain all other functions from the thirdperson camera. great behaviour you made there! kudo's!

Update about your code for the camera rotation: I applied it to both X and Y axis. Would it be a better option (performance wise) to just disable use of the mouse at all? Is there an easy java script for that? (I do work with Coppercube because im not a coder. I like to do visuals like my Retro diner mostly:)


smnmhmdy
Registered User
Quote
2022-09-13 15:08:05

Hey @shadynl, I checked the ccb file and the problem appears to be your animated mesh, specifically its pivot point.

The problem with coppercube's colliders (Collide when moved) is that they'll not rotate relative to the models rotation, that's why the buggy inconsistent collision with the ball happens.

You can easily fix this by centering your animated model's pivot point and set the relative position of the character's collider 'x' and 'z' values to 0

Regarding the fixed rotation, you can already disable the vertical movement of the mouse by setting `angleClamp` to a really small value like 0.0001 :)


shadynl
Registered User
Quote
2022-09-13 16:55:48

Thank you very much for looking into this! I knew it must have had to do with the model. Maybe it is because i assigned motions from various sources to the model. I mostly use the Mixamo motions but this particular model had mixed motions with probably mixed pivot points. I hope i can fix it by using Mixamo animations only because i am unable to edit those motions with BVHacker. I guess it can also be done with blender but my knowledge on blender only goes this far as creating lowpoly models with Makehuman. Im going to try some more toning. Thanks again.

quote: You can easily fix this by centering your animated model's pivot point and set the relative position of the character's collider 'x' and 'z' values to 0

I assume you mean i have to do this in blender right? :( I just figured Mixamo IS the problem:( damn!

Another option is to use the Carnegie Melon University MOCAP database i have download. There are some soccer moves in it. With BVHacker i can adjust the MOCAP files myself.


smnmhmdy
Registered User
Quote
2022-09-27 09:58:22

Hey @shadynl, I'm pretty sure there is a "Stay in place" (or something like that) checkmark in mixamo to fix this issue, Just make sure that your base model's pivot point is centered before exporting it to mixamo :)


shadynl
Registered User
Quote
2022-09-28 20:09:09

Thank you Smnmhmdy,

unfortunatly the exact motion i need does not have the 'stay in place' option while others do:(
Also i had no idea i could just upload my models to mixamo and add motion there, i did it all in blender:) I just figured that out lol.
Anyway with mixamo i can only assign 1 motion and i need multiple. I decided to use just 1 motion per character now and it works out great so far. I also read in the past it was possible to assign multiple animation with mixamo. :S they kind of downgraded that functionality.


btw: I also figured the carnegie melon MOCAP database has all correct pivot positions, and if you need to mod it you can do this easy with BVHacker :) If you ever need animations give me a sign, i have their full MOCAP database downloaded:) 3.7GB and a file is included so you can search any motion your looking for.


just_in_case
Moderator
Quote
2022-09-28 20:13:50

@shadynl, I have a video on My Youtube channel, on how to merge mixamo animations into one, You can check that video out, I have showed how to lock the character in place ( to the root) if the animation of mixamo has no in place option available.

Here is the link to the video;-
[urllhttps://www.youtube.com/watch?v=dljxdWpZRss&t=16s&ab_channel=GlitchedVelocity[/url]

I also have timestamps on the video so that you can see the part that has lock animation.
Hope that helps.


shadynl
Registered User
Quote
2022-09-29 14:27:55

Hey just_in_case,

I already saved your video to my favorites before. The thing is i dont want to spend a lot of time in blender at the moment. A couple years ago i could have done this without tutorial, but if you stop working for a while in blender you will eventually forget how to do those things. After i finish my Retro diner project i will perhaps take a look at it again fo other projects to come. Im happy to report so far the Retro diner project is going really well. Exactly how i want it to be. Im not sure about a release date so far but im working towards it every day lately:)


dynamogames
Registered User
Quote
2022-10-04 20:58:44

I'm trying to make a 3rd Person Shooter game in CopperCube but I have some issues, I had problems with player movement and collision. I'm using the 3rd Person behavior made by smnmhmdy not the one that comes with CopperCube Engine. The player movement is not in sync with WASD pressing and some parts of the character are colliding with the world after I added 'Collide When Moved' behaviour.
Pls I'll love if anyone could pls check it out and tell me where I'm wrong.
This is the link:
https://drive.google.com/file/d/...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internation?l" (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